Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
<% Dim objMM As New System.Net.Mail.MailMessage() Dim msg as String = "OK" try ' configure your mail appearance objMM.To.Add("email@example.com") objMM.From = New System.Net.Mail.MailAddress("firstname.lastname@example.org") objMM.IsBodyHtml = False objMM.Subject = "asp.net 2.0 test mail" objMM.Body = "asp.net 2.0 test mail body" ' define smtp and authentication credential Dim smtp As New System.Net.Mail.SmtpClient() smtp.Host = "mail.sender.com" smtp.Credentials = New System.Net.NetworkCredential("email@example.com","password") ' send the mail now smtp.Send(objMM) catch e as exception msg = e.message end try 'Response.Write "Message sent to " & strTo & "!" Response.Write "Your message has been sent. Thank You!" End If ' End page logic %>
Join the community of 500,000 technology professionals and ask your questions.