Home All Groups Group Topic Archive Search About
Author
14 Apr 2005 8:24 PM
VK
Hello,

   I am trying to send one simple email. However each time
I try this I get the following error:

The message could not be sent to the SMTP server. The
transport error code was 0x80040217. The server response
was not available.

Here is my code:

Function SendEmail()
        Dim mail As New MailMessage
        mail.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/smtpauthen
ticate", 1)
        mail.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/senduserna
me", "user")
        mail.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/sendpasswo
rd", "***")

        mail.From = "u***@user.com"
        mail.To = "myem***@myemail.com"
        mail.Subject = "test" 'Server.GetLastError.Message
        mail.Body = "body" 'Server.GetLastError.StackTrace

        SmtpMail.SmtpServer = "mail.myemail.net"
        SmtpMail.Send(mail)

    End Function

I have replaced the from, to, smtp server in this email
with some fake data, however in my application I am using
the real data.

Any idea?

Author
14 Apr 2005 10:07 PM
Brad
Here is good resource that might be helpful:
http://www.systemwebmail.com/faq.aspx
http://www.systemwebmail.net/faq/3.8.aspx


Show quoteHide quote
"VK" <anonym***@discussions.microsoft.com> wrote in message
news:142b01c5412f$ecfae0a0$a601280a@phx.gbl...
> Hello,
>
>   I am trying to send one simple email. However each time
> I try this I get the following error:
>
> The message could not be sent to the SMTP server. The
> transport error code was 0x80040217. The server response
> was not available.
>
> Here is my code:
>
> Function SendEmail()
>        Dim mail As New MailMessage
>        mail.Fields.Add
> ("http://schemas.microsoft.com/cdo/configuration/smtpauthen
> ticate", 1)
>        mail.Fields.Add
> ("http://schemas.microsoft.com/cdo/configuration/senduserna
> me", "user")
>        mail.Fields.Add
> ("http://schemas.microsoft.com/cdo/configuration/sendpasswo
> rd", "***")
>
>        mail.From = "u***@user.com"
>        mail.To = "myem***@myemail.com"
>        mail.Subject = "test" 'Server.GetLastError.Message
>        mail.Body = "body" 'Server.GetLastError.StackTrace
>
>        SmtpMail.SmtpServer = "mail.myemail.net"
>        SmtpMail.Send(mail)
>
>    End Function
>
> I have replaced the from, to, smtp server in this email
> with some fake data, however in my application I am using
> the real data.
>
> Any idea?

Bookmark and Share