MailMessage mailMessage = new MailMessage();ArrayList attachsendObject = new ArrayList();string mailServer = "internalmail.morningstar.com"; mailMessa ...
MailMessage mailMessage = new MailMessage();
ArrayList attachsendObject = new ArrayList();
string mailServer = "internalmail.morningstar.com";
mailMessage.From = new MailAddress("[email protected]");
mailMessage.Subject = "Error message auto-generated for CIT Operation Template";
//mailMessage.To.Add(UserEmail);
mailMessage.CC.Add("[email protected]");
// mailMessage.CC.Add("[email protected]");
mailMessage.Body = "<table style='border:1px solid;'><tr><td><font color='red'>郵件測試,呵呵</font></td></tr></table>";
mailMessage.IsBodyHtml = true;
mailMessage.BodyEncoding = System.Text.Encoding.UTF8;
SmtpClient client = new SmtpClient(mailServer);
client.Send(mailMessage);
Console.ReadKey();