tSettings["username"]
Matthias Rebbe
matthias_livecode_150811 at m-r-d.de
Sat Sep 17 04:10:03 EDT 2016
Hi Charles,
> Am 17.09.2016 um 09:52 schrieb Charles Warwick <charles at techstrategies.com.au>:
>
> The tsNetSmtp* functions can take multiple e-mail addresses in a single call, just ensure the tRecipient variable has one address per line.
>
Oh, thats brilliant. Much easier than doing a call for every address.
So one can add To, CC and Bcc recipients into one variable.
> As Matthias said, you also need to add the To: and Cc: headers accordingly.
>
> I have updated the LCMail.livecode stack to show an example:
>
> https://downloads.techstrategies.com.au/tsnet/LCMail.livecode <https://downloads.techstrategies.com.au/tsnet/LCMail.livecode>
>
> ... and I will try make the documentation a bit clearer :-)
>
> @Matthias: sorry, I made these changes before I saw you had updated your stack! Otherwise I would have made these changes to a copy of your stack instead.
Never mind. If i find the time today i will add your modifications to my stack and send it afterwards directly to you, if you don´t mind.
Matthias
>
> Cheers,
>
> Charles
>
>
> On 17/09/2016 9:22 AM, Matthias Rebbe wrote:
>> It´s late and i should go to sleep…
>>
>> After rereading i found an error in the if statement of the scripts.
>>
>> Here are the correct ones.
>>
>> then for the To recipients you would write:
>>
>> repeat for each line tRecipient in fld “To”
>> if tRecipient is empty then next repeat
>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>> end repeat
>>
>> for the Cc recipients:
>>
>> repeat for each line tRecipient in fld “Cc”
>> if tRecipient is empty then next repeat
>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>> end repeat
>>
>> and for the Bcc:
>>
>> repeat for each line tRecipient in fld “Bcc”
>> if tRecipient is empty then next repeat
>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>> end repeat
>>
>>
>>
>>> Am 17.09.2016 um 01:06 schrieb Matthias Rebbe <matthias_livecode_150811 at m-r-d.de>:
>>>
>>> 2nd try.
>>>
>>>
>>>> Am 16.09.2016 um 22:29 schrieb Mark Clark <markclark at mac.com <mailto:markclark at mac.com>>:
>>>>
>>>> Thanks for all the help so far. I forgot to ask -- what is the best way to add multiple recipients, BCC, etc?
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> regarding the multiple to:
>>>
>>> 1. you have to add the additional To recipients also to the smtp header. You have to separate the recipients with Comma.
>>> The line must end with CRLF.
>>>
>>> To: email1 at runrev.com, email2 at runrev.com, email3 at runrev.com
>>>
>>> For CC recipients it´s the same
>>> Cc: me at livecode.com, you at livecode.com, who at livecode.com
>>>
>>> A sample smtp header would then look like this:
>>>
>>> Content-Type: text/plain; charset=utf-8
>>> Date: Sat, 17 Sep 2016 00:37:04 +0200
>>> From: support at myawesomecompany.com
>>> To: email1 at runrev.com, email2 at runrev.com, email3 at runrev.com
>>> Cc: me at livecode.com, you at livecode.com, who at livecode.com
>>> Subject: =?UTF-8?B?TWVzc2FnZSB3aXRoIG5vbiBBU0NJSSDDs8K/wqHDoSc=?=
>>>
>>> This is the message.
>>>
>>>
>>>
>>> Very important : Bcc Recipients are not added to the SMTP header ! ! !
>>>
>>>
>>> 2. for sending you have to call the tsNetSmptSync function for every To, Cc and Bcc recipient.
>>>
>>> Lets say you have a To, a Cc and Bcc field. Every line contains a emailadress.
>>>
>>>
>>> then for the To recipients you would write:
>>>
>>> repeat for each line tRecipient in fld “To”
>>> if line tRecipient is empty then next repeat
>>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>>> end repeat
>>>
>>> for the Cc recipients:
>>>
>>> repeat for each line tRecipient in fld “Cc”
>>> if line tRecipient is empty then next repeat
>>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>>> end repeat
>>>
>>> and for the Bcc:
>>>
>>> repeat for each line tRecipient in fld “Bcc”
>>> if line tRecipient is empty then next repeat
>>> put tsNetSmtpSync(tURL, tSender, tRecipient, tPostData, tResponseHeaders,tBytes,tSettings) into tResult
>>> end repeat
>>>
>>>
>>> Regarding Dave´s question about Html. As you mentioned already,Sarahs library gives good advice how to implement that and it should work with tsNet. At least if you create smtp message (tPostData) correctly.
>>>
>>> For those who are intrested in Sarah´s scripts and library: She uploaded hem all to GitHub
>>> https://github.com/trozware/rev_stacks
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>>
>>>
>>>
>>>
>>>
>>> Matthias Rebbe
>>> Bramkampsieke 13
>>> 32312 Lübbecke
>>> Tel +49 5741 310000
>>> +49 160 5504462
>>> Fax: +49 5741 310002
>>> eMail: matthias at m-r-d.de
>>>
>>> BR5 Konverter - BR5 -> MP3
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
More information about the use-livecode
mailing list