Dear All,
i had write a code in asp.net which is can send a report throught mail. few days ago, it doesn't work well.
As below is the code had done. i use gmail as sender and query receiver data from local server database. kindly advise, thank you.
protected void SendMail()
{
MailMessage mm = new MailMessage();
mm.Subject = "Entry Pass Daily Attendances Report " + DateTime.Now.ToString("yyyyMMdd HHmmss");
//mm.Body = "<p><b>Entry Pass Daily Attendances Report</b></p><br>" + GridViewToHtml(EPACMKGV) + "<br> " + "<br>" + GridViewToHtml(EPDeptGV) + "<br><p>This e-mail is automatically generated by system. Please do not reply the mail directly. If you have any question on the e-mail, please call IT. Thank yo ...
Go to the complete details ...