Hi Thierry,

On 15/09/2017 6:31 PM, Thierry Douez via use-livecode wrote:
Hi all,

I've worked hard with tsNetSmtpSync() these last days,
on macOS Sierra with the latest LC 8.1.6
and have 2 questions which bothers me:

- from time to time (no recipe yet), I've got an error when executing it.
Executing it again (same code and context) and all is fine then.

What is the error message that you get?

- about the ResponseHeaders out parameter:
tsNet will try re-use an existing connection if there is one available, so this first example:
Sometimes I get:

220-xxx.yyyy.net ESMTP Exim 4.89 #1 Thu, 14 Sep 2017 14:17:38 +0200
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
250-xxx.yyyy.net Hello zzzzz [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
220 TLS go ahead
250-xxx.yyyy.net Hello pommeDesFouets [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
334 VXNlfg5hbWU6
334 UGFzc3sdfcmQ6
235 Authentication succeeded
250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsT5O-002hrt-TA
Indicates that there was no existing SMTP connection to the server, so it needed to establish a new connection.

Where in the following example:
or this:

250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsSmD-003WQr-2l
This indicates that tsNet found an existing SMTP connection to the server you are connecting to, so could just send the message across the already open connection.

You can add the "no_reuse" element with a value of true to the settings array (last parameter to tsNetSmtpSync) if you want to establish a fresh connection for each e-mail that is sent rather than allowing tsNet to reuse an existing connection.

Hope that helps,

Regards,

Charles


In both cases, the email is sent and received correctly.

Thanks for some hints.

Thierry




_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to