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

How do I add user account to my domain's email ?

For DotNetPanel Account For the new sign-up account, when it is activated by default the main...

How to set up email with Outlook 2003?

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

What is SPF record and How to enable it?

SPF provides a way for a domain to tell the world that mail "from" that domain should only arrive...

I could not open email using Outlook or any Mail Client

First, please make sure that your email account is created on our server.You can check this by...

How do I setup Outlook Express?

Please note, replace with your actual domain name.   1. Open Express. ...