benjbong Posted February 15, 2012 Posted February 15, 2012 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?
Developers Jos Posted February 15, 2012 Developers Posted February 15, 2012 (edited) This is not enough information to go on. The exchange server has SMTP services enabled? Jos Edited February 15, 2012 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
benjbong Posted February 15, 2012 Author Posted February 15, 2012 yes, the SMTP send connector is enabled on the exchange server
benjbong Posted August 14, 2012 Author Posted August 14, 2012 (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 August 14, 2012 by benjbong
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now