究竟如何,何地,做我把實際的文件位置的字符串attachmentPath
:想不通怎麼辦附件與MvcMailer
public virtual MailMessage Welcome(string attachmentPath)
{
var mailMessage = new MailMessage{Subject = "Welcome to MvcMailer"};
...
mailMessage.Attachments.Add(new Attachment(attachmentPath));
PopulateBody(mailMessage, "Welcome");
return mailMessage;
}
設定的c:\inetpub\server\website\docs\test.pdf
對不起,我遲到的反應。我究竟在哪裏「宣佈」(如果是這樣)'attachmentFile'?我該如何「聲明」它? – REMESQ 2012-07-29 14:57:00