Admin-Ahead Community

Windows => General Windows => Topic started by: dustin on November 28, 2014, 07:37:52 pm

Title: Enabling SMTP authentication while sending emails.
Post by: dustin 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.