Hi,
I'm trying to use System.Web.Mail.MailMessage() to send emails, but I get this error: The server rejected the sender address. The server response was: 553 Authentication is required to send mail as <something@johndoe.com>. Should I be using another method rather then the one below?
Dim email As New System.Web.Mail.MailMessage()
email.To = "RecipientAddress"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send(email)
Thanks! Merry Christmas!!
I'm trying to use System.Web.Mail.MailMessage() to send emails, but I get this error: The server rejected the sender address. The server response was: 553 Authentication is required to send mail as <something@johndoe.com>. Should I be using another method rather then the one below?
Dim email As New System.Web.Mail.MailMessage()
email.To = "RecipientAddress"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send(email)
Thanks! Merry Christmas!!