我将每个人的报告动态存储为pdf
并且应该将其发送给他们的电子邮件Attacment
。如何将其作为电子邮件的附件发送。这是我的代码。
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);
}