Jump to content

_INetSmtpMail Mail failed with error code 50?


Recommended Posts

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

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 3 months later...

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!!!
Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 1 month later...

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

Link to comment
Share on other sites

  • Developers

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

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

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