Jump to content

sending mail with attachment _inetsmtpmailcom


benjbong
 Share

Recommended Posts

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?

Link to comment
Share on other sites

  • Developers

This is not enough information to go on.

The exchange server has SMTP services enabled?

Jos

Edited 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.
  :)

Link to comment
Share on other sites

  • 5 months later...

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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