Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Enabling SMTP authentication while sending emails.  (Read 3656 times)

0 Members and 1 Guest are viewing this topic.

dustin

  • Guest
Enabling SMTP authentication while sending emails.
« on: November 28, 2014, 07:37:52 pm »
We can enable SMTP authentication while sending emails through ASP.NET web form.

ASP.NET 4.5 which makes use of CDO object for implementing this.

First we need to create an object of smtpClient() and pass the required mail server as parameter
Dim smtp As New SmtpClient(“mail.example.com”)

Pass your mail account username and password to NetworkCredential() object
smtp.Credentials = New NetworkCredential(“email address”, “Password”)

Now your mails will be authenticated.