-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.txt
20 lines (18 loc) · 1.04 KB
/
mail.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SmtpClient smtpServer = new SmtpClient();
MailMessage mail = new MailMessage();
smtpServer.Credentials = new System.Net.NetworkCredential( "cncroadways@gmail.com","password");
smtpServer.Port = 587;
smtpServer.Host = "smtp.gmail.com";
smtpServer.EnableSsl = true;
mail.From = new MailAddress("cncroadways@gmail.com");
mail.To.Add(email);
mail.Subject ="..:CnC Roadways:..-Registration";
mail.Body = "Warm,Welcome To CnC Roadways \n\n\n \t Now You Can Book Your Bus Onnline With Your Username And PassWord Which Is \n\n\t\t Username:"+ uname +" \n\t\t Password:"+ pass +". \n\n\n\t\t\t\t\t Thankyou \n\t\t\t\t\t\t\t\t\t\t\tCnC Roadways Administrative Department.";
try
{
smtpServer.Send(mail);
del_usr_Request(strCmdArg);
}
catch (Exception ex)
{
}