Alternative for this please

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Alternative for this please

Post by hrcap » Tue Feb 13, 2024 8:49 pm

Hi All

I am trying to send an email via tsNetSmtpSync

On older versions of Livecode this was working fine... but now it appears that I need to mimeEncode the body text of my email first before putting it into:

Code: Select all

put tsNetSmtpSync(tURL, t_from, tRecipient, tEmailMessage, tResponseHeaders, tBytes, tSettings) into tResult  

When I run a trial to convert the body text with the below it works fine

Code: Select all

put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field "email_message") into tBody

...however this relies on needing a field on the layout which contains the body text

... is there a way to achieve the same but without having a field on the layout? i.e. having the body text in a variable?


Any Help on this would be appreciated as I want to avoid the need for a field on the layout


Many Thanks

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Alternative for this please

Post by stam » Wed Feb 14, 2024 1:44 am

mimeEncodeAsMIMEEmail
mimeEncodeAsMIMEMultipartDocument

Found these in the dictionary, seems like what you're looking for?

Check out the Dictionary for the MIME library

hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Re: Alternative for this please

Post by hrcap » Wed Feb 14, 2024 2:56 am

Excellent, thank you very much Stam

I have now got this working using mimeEncodeAsMIMEMultipartDocument to first encode the body text.

Mant Thanks

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”