Jump to content

Recommended Posts

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")
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
Link to post
Share on other sites

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...