Sign in to follow this  
Followers 0
benjbong

sending mail with attachment _inetsmtpmailcom

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This is not enough information to go on.

The exchange server has SMTP services enabled?

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

yes, the SMTP send connector is enabled on the exchange server

Share this post


Link to post
Share on other sites

#4 ·  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

Share this post


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
Sign in to follow this  
Followers 0