Message could not be sent
14 February 2008 Tips  Marek Sienkiewicz
Bubble image

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


This means that username and password are incorrect.

 Mail.To = "YourName@DomainName.com"
 Mail.From = txtName.Text

 Mail.BodyFormat = MailFormat.Text
 Mail.Priority = MailPriority.Normal
 Mail.Subject = "Your Reference"

Mail.Body = "From: " + txtName.Text + vbNewLine +
"Email: " + txtEmail.Text + vbNewLine +
"Subject: " + txtSubject.Text + vbNewLine +
"Message: " + txtMessage.Text

Mail.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1")

Mail.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/sendusername", "YourName@DomainName.com")

Mail.Fields.Add(
"http://schemas.microsoft.com/cdo/configuration/sendpassword",
"Password")

 SmtpMail.SmtpServer = "mail.DomainName.com"
 SmtpMail.Send(Mail)

Note that System.Web.Mail is obsolete and
the alternative is System.Net.Mail




Small Comment Icon More posts of this quality. Not the usual c***, plsaee
Comment posted by  Vlora: on  05 September 2011
Small Comment Icon 9cQZwM , [url=http://tjzoyzrmkbrc.com/]tjzoyzrmkbrc[/url], [link=http://bxkbxhgvdjhj.com/]bxkbxhgvdjhj[/link], http://ilqreitgyucc.com/
Comment posted by  jzbexdsin: on  08 September 2011


Please post your comments:

Name

Email
                           

   

Enter the text you see in the box:

Captcha Image