tsNet mail message not formatting
matthias_livecode_150811 at m-r-d.de
matthias_livecode_150811 at m-r-d.de
Wed Mar 3 19:01:55 EST 2021
Thanks Charles,
-
Matthias Rebbe
Life Is Too Short For Boring Code
this might is a relic from times before tsNET. When i started with tsNet i modified existing code and maybe i kept this "bad" behaviour. ;)
I used this only for inhouse status and alert emails for up to 5 recipients and never ran into a problem.
But i will keep it in mind for future use.
> Am 04.03.2021 um 00:48 schrieb Charles Warwick via use-livecode <use-livecode at lists.runrev.com>:
>
> Hi Matthias,
>
> I would not recommend sending e-mail this way. It will create a new SMTP connection and send the e-mail message separately for every single recipient.
>
> SMTP connections (and tsNetSMTP* commands) are designed to handle multiple recipients for one e-mail within a single SMTP transfer.
>
> Regards,
>
> Charles
>
>> On 4 Mar 2021, at 9:30 am, matthias rebbe via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>> wrote:
>>
>> Rick,
>>
>> let's say
>>
>> pTO contains one or more email recipients, each in one line
>> pCC contains one or mor cc recipients, each in one line
>> pBCC contains one or more bcc recipients, each in one line
>> tData contains the mime encoded message which includes all To and all CC recipients
>>
>> then you would do
>>
>>
>> repeat for each line tLine in pTO
>> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, tSettings)
>> end repeat
>>
>> repeat for each line tLine in pCC
>> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, tSettings)
>> end repeat
>>
>> repeat for each line tLine in pBCC
>> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, tSettings)
>> end repeat
>>
>> The last repeat sends to the BCC recipients.
>>
>>
>>
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>>
>>> Am 03.03.2021 um 23:19 schrieb Rick Harrison via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>>> Ok, everything is fine on the format front now.
>>> I noticed the code takes about a minute to execute all the way through.
>>> (Must be a lot of background process have to run?)
>>> I tried Charles Warwick’s suggestion for Bcc, and it didn’t work. :-(
>>> If any of you want to take a crack at it, please let me know your results.
>>> Thanks to everyone!
>>> Rick
>>> _______________________________________________
>>> 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
>> 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>
More information about the use-livecode
mailing list