lundi 20 avril 2015

Send email in specific time ASP

Vote count: 0

I need to send email for specific user remind him to specific task, this should make if the EndTime filed in my database is the same as datetime now !

i use this for send mail and work correctly how implement check in database Endtime filed and send mail if the time is identical

using (MailMessage mail= new MailMessage("from_mail","To _mail"))


mail.Subject = " the subject of the mail here.";

mail.Body = "text for the e-mail here.";

mail.IsBodyHtml = false;

SmtpClient smtp = new SmtpClient();

smtp.Host = "";

smtp.EnableSsl = true;

NetworkCredential NetworkCred = new NetworkCredential("account name", "account password");

smtp.UseDefaultCredentials = true;

smtp.Credentials = NetworkCred;

smtp.Port = 587;


ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Email sent.');", true);


asked 1 min ago

Send email in specific time ASP

Aucun commentaire:

Enregistrer un commentaire