By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Sending emails

P: n/a
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 = "us**@user.com"
mail.To = "my*****@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?
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Here is good resource that might be helpful:
http://www.systemwebmail.com/faq.aspx
http://www.systemwebmail.net/faq/3.8.aspx
"VK" <an*******@discussions.microsoft.com> wrote in message
news:14****************************@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 = "us**@user.com"
mail.To = "my*****@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?

Nov 19 '05 #2

P: n/a
Here is good resource that might be helpful:
http://www.systemwebmail.com/faq.aspx
http://www.systemwebmail.net/faq/3.8.aspx
"VK" <an*******@discussions.microsoft.com> wrote in message
news:14****************************@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 = "us**@user.com"
mail.To = "my*****@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?

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.