How to send email daily
how to send email daily at particular time automatically in c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suresh Babu113 reputationPosted Oct 7, 2013, 12:33 AM EDT
raman aujla6 reputationPosted Oct 7, 2013, 1:05 AM EDT
Veena SardaRank #79 · 24.5K reputationPosted Oct 7, 2013, 1:13 AM EDT
Prasenjit DeyRank #6,279 · 271 reputationPosted Oct 7, 2013, 1:29 AM EDT
Code for sending mail
try{message =newMailMessage();if(IsValidEmail(txtTo.Text)){message.To.Add(txtTo.Text);}if(IsValidEmail(txtCC.Text)){message.CC.Add(txtCC.Text);}message.Subject = txtSubject.Text;message.From =newMailAddress("[email protected]");message.Body = txtBody.Text;if(lblAttachment.Text.Length > 0){if(System.IO.File.Exists(lblAttachment.Text)){message.Attachments.Add(newAttachment(lblAttachment.Text));}}// set smtp detailssmtp =newSmtpClient("smtp.gmail.com");smtp.Port = 25;smtp.EnableSsl =true;smtp.Credentials =newNetworkCredential("[email protected]","Your Password");smtp.Send(message, message.Subject);}catch(Exception ex){MessageBox.Show(ex.Message);}Puneet GuptaRank #2,006 · 724 reputationPosted Oct 7, 2013, 5:47 AM EDT
http://www.codeproject.com/Articles/21418/Scheduled-Tasks-Web-Service
http://www.codeproject.com/Articles/24586/Schedule-your-web-tasks-with-the-WebTaskScheduler
Thanks,
Puneet Gupta