CAll Us: +91 88 00 563434   Login

Authenticate Emails in ASP.NET Using SMTP

Nowadays, you need to enable SMTP authentication for all emails send from your hosting account. It is easy to enable SMTP in case if you make use of e-mail clients such as Outlook. However, you should provide the required authentication code if you attempt to send an e-mail through ASP.NET web form.

ASP.NET 4.5 has simplified the process of SMTP authentication when compared to prior versions, which make use of CDO object.

(1) You need to create an object of smtpClient() and pass the required mail server as parameter

Dim smtp As New SmtpClient(“”)

(2) Pass your mail account username and password to NetworkCredential() object

smtp.Credentials = New NetworkCredential(“”, “Your Password”)

You have to replace the domain – and Your Password with your correct credentials.

Your emails will now be authenticated.

Leave a Reply