Hello
I am getting the following error on a forgotten.aspx page:
Mailbox unavailable. The server response was: Authentication is required for relay
This is the code I have:
Is there anything here, please, that looks obviously wrong? I have checked with my Web hosting service, and the SMTP port, password, and host (mail.server) are correct (they work in another part of the site).
Thanks.
I am getting the following error on a forgotten.aspx page:
Mailbox unavailable. The server response was: Authentication is required for relay
This is the code I have:
Code:
myMessage.From = New MailAddress("info@mysite.net") myMessage.To.Add(New MailAddress(strEmailValue)) 'user's email myMessage.Subject = ("Password Reset Request") myMessage.Body = "" myMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure myMessage.IsBodyHtml = True myMessage.Priority = MailPriority.Normal HTML code to display header in email and link for user to click on to reset password myMessage.AlternateViews.Add(HtmlMessage) Smtpserver.DeliveryMethod = SmtpDeliveryMethod.Network Smtpserver.Host = ("mail.server") Smtpserver.Port = 25 Smtpserver.EnableSsl = False Dim basicAuthenticationInfo As New System.Net.NetworkCredential("info@mysite.net", "pwd") Smtpserver.Credentials = basicAuthenticationInfo Smtpserver.Send(myMessage) myMessage.Dispose() myMessage = Nothing Smtpserver = Nothing
Thanks.