Jump to content

Recommended Posts

Posted

I'm trying to send an email with attachment. the script is:

#include <INetSmtpMailCom.au3>
_INetSmtpMailCom("mail server", "from name", "from address", "to address", "Test", "This is a test", _
"attachment file", "", "", "Normal", "username", "password", 25)

I've obscured the parts of the script with sensitive info. The script will send an email with the attachment, but I get this error:

Error code:2 Description:The transport failed to connect to the server.

I've tried multiple from/to addresses as well as usernames and passwords all with the same result, it will throw the error but the message still sends successfully. This is on an exchange 2010 server.

What is the cause of this error?

  • 5 months later...
Posted (edited)

I was able to fix this by commenting out the error message box portion of the inetsmtpmailcom.au3 include. The lines are:

#cs
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
EndIf
#ce

Obviously you would want to make sure everything is working before removing your error checking :), since everything was working properly for me I didn't see it as a problem.

Edited by benjbong

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
×
×
  • Create New...