Email med asp.net (vb)
Exception Details: System.Runtime.InteropServices.COMException: The server rejected the sender address. The server response was: 501 5.5.4 Invalid AddressSource Error:
Line 121: mail.BodyFormat = 1
Line 122: SmtpMail.SmtpServer = "Localhost"
Line 123: SmtpMail.Send(mail)
Line 124: End Sub
Line 125:
Selve koden jeg bruger er
Sub SendEmail
Dim mail As New MailMessage
mail.From = "Automated Email System"
mail.To = txtEmail.Text
mail.Subject = "Confirmation of your Username and Password"
mail.Body = "Your username and password is" & txtUsername.text & txtPassword.text
mail.BodyFormat = 1
SmtpMail.SmtpServer = "Localhost"
SmtpMail.Send(mail)
End Sub
er det en fejl i min kode eller manglende opsætning af min smtp server på win 2003 server?
