RSS

Sending email in ASP.NET with email validation

30 May

//MailMessage tipsMail = new MailMessage();
//tipsMail.To.Add(email);
//tipsMail.From = new MailAddress(System.Configuration.ConfigurationManager.AppSettings[“fromAddress”].ToString());
//tipsMail.From = new MailAddress(“PMTips@mosaiquegroup.com”);
//tipsMail.Subject = “Project Management Tips from Mosaique”;
//tipsMail.Body = tipsMessage;
//tipsMail.IsBodyHtml = true;
// tipsMail.To.Add(System.Configuration.ConfigurationManager.AppSettings[“adminEmail”].ToString());
// tipsMail.To.Add(System.Configuration.ConfigurationManager.AppSettings[“adminEmail2”].ToString());
//tipsMail.To.Add(System.Configuration.ConfigurationManager.AppSettings[“adminEmail3”].ToString());
// tipsMail.To.Add(“javedarifkhan1@gmail.com”);

// SmtpClient smtp2 = new SmtpClient(“localhost”);
//// NetworkCredential credential2 = new NetworkCredential(System.Configuration.ConfigurationManager.AppSettings[“smtpUser”], System.Configuration.ConfigurationManager.AppSettings[“smtpPass”]);
// NetworkCredential credential2 = new NetworkCredential(“smtpUser”, “XXXXX”);
// smtp2.Credentials = credential2;
// smtp2.EnableSsl = true;
// smtp2.Send(tipsMail);

//MailMessage msg = new MailMessage();
//System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
//msg.From = new MailAddress(“smtpUser@domain.com”);
//msg.To.Add(email);
//msg.IsBodyHtml = true;
//msg.Body = tipsMessage;
//client.Host = “localhost”;
//System.Net.NetworkCredential basicauthenticationinfo = new System.Net.NetworkCredential(“Username”, “password”);
////client.Port = int.Parse(“587”);
//client.EnableSsl = true;
//client.UseDefaultCredentials = false;
//client.Credentials = basicauthenticationinfo;
//client.DeliveryMethod = SmtpDeliveryMethod.Network;
//client.Send(msg);

//MailMessage tipsMail = new MailMessage();
//tipsMail.From = “user@domain.com”;
//tipsMail.To.Add(email);
//System.Net.Mail.SmtpClient mail = new System.Net.Mail.SmtpClient();
//tipsMail.Body = tipsMessage;
//tipsMail.To.Add(“javedarifkhan1@gmail.com”);
//tipsMail.IsBodyHtml = true;

//SmtpClient smtp = new SmtpClient(“localhost”);
// smtp.Credentials = credential;
//smtp.EnableSsl = true;
//smtp.Send(tipsMail);

//////////// USING GOOGLE SMTP SERVER //////////////////
//// smtp.Host = “smtp.gmail.com”; // smtp.UseDefaultCredentials = true;
//SmtpClient smtp = new SmtpClient();
//smtp.Host = System.Configuration.ConfigurationManager.AppSettings[“smtpHost”].ToString();
//smtp.EnableSsl = true;
//NetworkCredential NetworkCred = new NetworkCredential(System.Configuration.ConfigurationManager.AppSettings[“smtpGUser”].ToString(), System.Configuration.ConfigurationManager.AppSettings[“smtpGPass”].ToString());
//smtp.Credentials = NetworkCred;
//smtp.Port = int.Parse(System.Configuration.ConfigurationManager.AppSettings[“smtpGPort”].ToString());
//smtp.Send(tipsMail);

Advertisements
 
Comments Off on Sending email in ASP.NET with email validation

Posted by on May 30, 2018 in Uncategorized

 

Comments are closed.

 
%d bloggers like this: