Sign in to follow this  
Followers 0
qaravi

error 50 in _Inetsmtpmail function

6 posts in this topic

when we get the error 50 in _inetsmtpmail?

the function was worked once.

i have given outgoing smtp address also

all parameters passed successfully but it is giving error 50

any ideas

thanks,

ravi

Share this post


Link to post
Share on other sites

need code to help.. or are you just getting an error with no code??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

need code to help.. or are you just getting an error with no code??

8)

#include <INet.au3>

$s_SmtpServer = "192.168.151.10"

$s_FromName = "ravi_qa"

$s_FromAddress = "ravi@gmail.com"

$s_ToAddress = "honest@yahoo.com"

$s_Subject = "testing smtp"

Dim $as_Body[2]

$as_Body[0] = "autoit"

$as_Body[1] = "it's working"

$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

Share this post


Link to post
Share on other sites

AutoIt3 2.3.4.2 inserts space before "HELO" command producing " HELO computername" which email server (exchange in particular) fails to handle.

Share this post


Link to post
Share on other sites

AutoIt3 2.3.4.2 inserts space before "HELO" command producing " HELO computername" which email server (exchange in particular) fails to handle.

Is there a way to work around this?

Thanks,

Olivier.

Share this post


Link to post
Share on other sites

I am also interested to know if there is a fix for this.

I also observed that when I restart my PC and run the same script above, it will work on the first execution. After that an error 50 is returned.

You'll have to restart the PC again to make it work.

I guess this has something to do with the smtp session.. Just a suspicion.

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