autoit _INetSmtpMail Mail failed with error code 50, solution

With exchange 2003 at least

From here

https://www.autoitscript.com/forum/topic/66691-_inetsmtpmail-mail-failed-with-error-code-50/

You need to use a -1 for the optional parameter

$sFirst [optional] string sent before helo for the smtp server connection (by default {SPACE}). To not send any character this parameter must equal -1, some SMTP server required it.

From https://www.autoitscript.com/autoit3/files/beta/autoit/docs/libfunctions/_INetSmtpMail.htm

So it ends up being

Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body,”,-1)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s