Jump to content

Recommended Posts

Posted

hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response

#include <INet.au3>

$s_SmtpServer = "mysmtpserver.com.au"

$s_FromName = "My Name"

$s_FromAddress = "From eMail Address"

$s_ToAddress = "To eMail Address"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

$err = @error

If $Response = 1 Then

MsgBox(0, "Success!", "Mail sent")

Else

MsgBox(0, "Error!", "Mail failed with error code " & $err)

EndIf

i suspect that i need to be running my own mail server on my computer, how do you guys do it, is there a server out there

that allows you to use it for testing?

Posted

hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response

#include <INet.au3>

$s_SmtpServer = "mysmtpserver.com.au"

$s_FromName = "My Name"

$s_FromAddress = "From eMail Address"

$s_ToAddress = "To eMail Address"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

$err = @error

If $Response = 1 Then

MsgBox(0, "Success!", "Mail sent")

Else

MsgBox(0, "Error!", "Mail failed with error code " & $err)

EndIf

i suspect that i need to be running my own mail server on my computer, how do you guys do it, is there a server out there

that allows you to use it for testing?

No you don't.

All you would need to know for that to work is your ISP. And yours is?

♡♡♡

.

eMyvnE

Posted

Search for an open SMTP relay (rare due to obvious abuse), install your own SMTP server... or check the settings from your standard Email provder (ISP, Webmail), in the FAQ there's usually a passage about SMTP and POP3 settings...

Posted

hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response

1.) make use of the optional parameters $s_helo, and $s_first, set the 2nd one to -1

2.) try blat.exe to see, if it can do SMTP to that server successfully.

Included with BLAT.EXE package is a BLAT.DLL (iirc), that one (with fileinstall() func) is how I coded to send email from autoit, before _INetSmtpMail() was improved quite a time ago.

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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