Sign in to follow this  
Followers 0
n9mfk9

_INetSmtpMail Mail failed with error code 50?

10 posts in this topic

Hi All,

here my code

#include <INet.au3>

$s_SmtpServer = "localhost"
$s_FromName = "n9mfk9"
$s_FromAddress = "n9mfk9@yahoo.com"
$s_ToAddress = "n9mfk@comcast.net"
$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

im getting Mail failed with error code 50

how can i fixthis beau

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Are you sure that your server is valid? I've always used something like smtp.gmail.com...

Im using a program called yahoo pops so i can use localhost

Beau

Edited by n9mfk9

Share this post


Link to post
Share on other sites

Im using a program called yahoo pops so i can use localhost

Beau

Sorry to bring an old thread up again, but I just found an answer to this particular problem, for exchange at least:

_INetSmtpMail ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress [,$s_Subject [,$as_Body [,$s_helo, [,$s_first [,$b_trace]]]]])

set $s_first to -1

IE

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)

for exchange 2007 this solved my error 50 problem.

hope this helps someone.

Share this post


Link to post
Share on other sites

Sorry to bring an old thread up again, but I just found an answer to this particular problem, for exchange at least:

_INetSmtpMail ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress [,$s_Subject [,$as_Body [,$s_helo, [,$s_first [,$b_trace]]]]])

set $s_first to -1

IE

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)

for exchange 2007 this solved my error 50 problem.

hope this helps someone.

Perfect - this also fixed my issue with error code 50 - thanks!!!

Share this post


Link to post
Share on other sites

Hello,

It appears you have found your answer to your question.

Please take the time to edit your thread title with [RESOLVED] so others know that is it resolved.

You can do this by scrolling to the top of your thread, clicking EDIT and then Full Edit and adding: "[RESOLVED]"

to the front of your thread title.

Thanks for your cooperation.

Share this post


Link to post
Share on other sites

Perfect - this also fixed my issue with error code 50 - thanks!!!

This solved my troubles as well, proof that posting fixes is better late than never :)

Share this post


Link to post
Share on other sites

Also wanted to say that this fixed error code 50 on Exchange 2003 as well. Thanks

Share this post


Link to post
Share on other sites

I am getting the same thing

nothing seems to be helping me.. PLEASE HELP ME OUT.

IM using smtp.gmail.com as my SMTP host

but I still get the same error. DO I need to somehow enter a password for the host.

Hi All,

here my code

#include <INet.au3>

$s_SmtpServer = "localhost"
$s_FromName = "n9mfk9"
$s_FromAddress = "n9mfk9@yahoo.com"
$s_ToAddress = "n9mfk@comcast.net"
$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

im getting Mail failed with error code 50

how can i fixthis beau

Share this post


Link to post
Share on other sites

#10 ·  Posted

I am getting the same thing

nothing seems to be helping me.. PLEASE HELP ME OUT.

IM using smtp.gmail.com as my SMTP host

but I still get the same error. DO I need to somehow enter a password for the host.

GMail uses secure smtp so this will never work.

look for _InetSmtpMailCom() in the examples forum that will allow this.

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

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