What are the process involved in authenticating the mail in ASP?

What are the process involved in authenticating the mail in ASP?

Use the below mentioned contents to know the process involved in authenticating the mail.

1] First create the mail message as like -> MailMessage mail = new MailMessage();

2] Then set the addresses as mentioned below
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");

3] Set the content as like below ->
mail.Subject = "This is an email";
mail.Body = "This is the body content of the email.";

4] Now send the message as ->
SmtpClient smtp = new SmtpClient("127.0.0.1");

5] Inorder to authenticate, user must set the username and password properties on the SmtpClient as like below.
smtp.Credentials = new NetworkCredential("username", "secret"); smtp.Send(mail);

In step 2, you must replace the words "me and you@mycompany.com", with your name and yours company's name.

Was this answer helpful?

 Print this Article

Also Read

How to create Database and user to the Database in Plesk?

Create Database You can create database using the following steps. Step 1: Login to the Plesk....

How to setup a access database in plesk?

Access database (mdb) in Plesk - How to setup a access database in plesk Upload the mdb file in...

How do i disable directory listing from Plesk?

Disable Directory Listing Step 1:Login to Plesk Step 2:Goto Domains -> Domain Name -> Web...

How to create or edit the MX windows in plesk windows server

Login to your Plesk using the username and password associated with your domain. In right pane...

How to redirect using Plesk ControlPanel?

Redirect Using Plesk Step 1:Login to plesk control panel. Step 2:Select Mail. Step 3:Select on...