I'm trying to submit a form by email using VB.NET
I was using my personal email address for testing purposes, but now that I'm trying to use my hosting company's (Interland) I get the following error:
550 5.1.1 You must be authenticated to use this server
Here's the code as it stands now:
I also have the possibility of using an HTTP email address a la Hotmail; does .NET support this? If so, would I need to put somewhere in the code the username and password for the email account?
Thanks in advance for the help
I was using my personal email address for testing purposes, but now that I'm trying to use my hosting company's (Interland) I get the following error:
550 5.1.1 You must be authenticated to use this server
Here's the code as it stands now:
Code:
Private Sub SendEmail()
Dim email As New System.Web.Mail.MailMessage 'Declares new email msg
email.To = Session("strEmail") 'Receiver
email.From = "confirmation@xx.xxx.xx.xx" 'Sender
email.Subject = "We received your information!" 'Subject
email.Body = "Dear " & Salutation() & Session("strLastName") & vbCrLf & vbCrLf & _
"This is an email confirming that we have received the" _
& " information from your questionnaire and are in the process of reviewing it. One of" _
& " our certified physicians will get back to you as soon as possible." 'Body
System.Web.Mail.SmtpMail.SmtpServer = "smtp.registeredsite.com" 'SMTP server
System.Web.Mail.SmtpMail.Send(email) 'Sends the email
End Sub
I also have the possibility of using an HTTP email address a la Hotmail; does .NET support this? If so, would I need to put somewhere in the code the username and password for the email account?
Thanks in advance for the help