【发布时间】:2014-04-24 06:09:02
【问题描述】:
我正在使用 powershell 通知大量用户文档的到期日期。
我已经准备好了剧本
$smtpServer = "xxxxx.contoso.com"
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = New-Object Net.Mail.mailaddress "xxxx@contoso.es", "xxx yyy zzz"
$msg.ReplyTo = "no-reply@contoso.es"
$msg.To.Add("xxx@contoso.es")
$msg.bcc.add($bcc)
$msg.subject = "Expiration notification"
$msg.body = 我需要包含 HTML 内容,或 MHT 或 bin 作为 Outlook 消息格式。
$smtp.Send($msg)
但是电子邮件正文是使用 Outlook 预先格式化的,因此它包含图像、预先格式化的文本等。在邮件正文中包含此类内容的最佳方式是什么??
谢谢!
【问题讨论】:
标签: html email powershell outlook smtp