I am creating a report on an asp.net webpage using an html table and asp.net tables. A finished report that I have to send by email in the body of the message. I did this with the following C # code:
public bool SendEMail(List<string> emailList, string strSubject, string strMessage, bool isHTML) { MailMessage msg = new MailMessage(); msg.From = new MailAddress(strFrom); //emailList is a list of email addresses to be sent to if (emailList != null && emailList.Count > 0) foreach (string em in emailList) { msg.To.Add(em); } else return false; msg.Subject = strSubject; msg.Body = strMessage; msg.IsBodyHtml = isHTML; SmtpClient smtp = new SmtpClient(mailServer); smtp.Credentials = new System.Net.NetworkCredential(userName, usePass); smtp.Send(msg); msg.Dispose(); return true; }
This works well, but only sets the styles set inside the form itself on each control separately. How can I embed css in html-head or in a stylesheet? Can I also turn on skins?
source share