Jump to content

Recommended Posts

Posted

Does anyone see anything wrong with this? The email does not send and I get an error of "Mail failed with error code 50". From the Help guide, this seems to be a problem with the body. I have even tried removing the code for the body, still same error.

#include <Inet.au3>
Local $s_SmtpServer = "mailrelay.XXX.XXX"
Local $s_FromName = "prgwkp"
Local $s_FromAddress = "XXX@Server.com"
Local $s_ToAddress = "XXXXX@XXX.com"
Local $s_Subject = "Subject Test"
Local $as_Body[2]
$as_Body[0] = "Body Test"
$as_Body[1] = "Second Line"
Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
Local $err = @error
If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf
Posted

After looking at the error code 50 again in the Help files, its 5x, where x is the last command issues, so apparently its not opening the SMTP session. I know the SMTP info is correct, any thoughts on why it would not open it?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...