2
我將每個人的報告動態存儲爲pdf
,並將其發送給他們attached with email
。我如何將它作爲附件發送到電子郵件。這是我的代碼。如何將pdf文件作爲電子郵件的附件添加到
public void Esendmail(string EmailFrom, string EmailTo, string EmailBody, string EmailSubject, string EmailCC)
{
MailMessage message = new MailMessage();
message.From = new MailAddress(EmailFrom);
message.CC.Add(EmailCC);
message.To.Add(new MailAddress(EmailTo));
message.IsBodyHtml = true;
message.Body = EmailBody;
message.Subject = EmailSubject;
SmtpClient client = new SmtpClient();
client.Send(message);
}