How do I send email from ASP using SMTP Authentication in ASP.NET1.1

The following code is developed in VB:

Sub Button1_Click(sender As Object, e As EventArgs)
' Build a MailMessage
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mailMessage.From = ""
mailMessage.To = ""
mailMessage.Subject = "Email Subject"
mailMessage.Body = "EMail Message Body"
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html

mailMessage.Fields("") = 25
mailMessage.Fields("") = 2
mailMessage.Fields("") = 1
mailMessage.Fields("") = ""
mailMessage.Fields("") = "password"

System.Web.Mail.SmtpMail.SmtpServer = ""
End Sub

Was this answer helpful?

 Print this Article

Also Read

Instructions for requesting SBC Port 25 Filter Removal

1. Visit the following web site: You may be prompted...

General ASPWebHosting Mail Server Information provides all customers with access to send and receive internet email using...

How to set up email with Outlook 2002?

Follow the steps below to set up Outlook 2002 to retrieve email from our mail server. From...

What is Greylisting?

Greylisting (or graylisting) is a method of defending e-mail users against spam. A mail transfer...

How to send email using PHP script?