【发布时间】:2020-06-20 02:29:36
【问题描述】:
我正在尝试在正文中添加多行,但找不到修复方法。我试图用 html 来做,但我不知道如何......
$Email = "x"
$Internal = "x"
$Subject = "New"
$Body = "Sending new files. Cheers!"
[array]$attachments = Get-ChildItem "\\ip\ftp$\new\Fac" *.pdf
if ([array]$attachments -eq $null) {
}
else {
$Msg = @{
to = $Email
cc = $Internal
from = "to"
Body = $Body
subject = "$Subject"
smtpserver = "server"
BodyAsHtml = $True
Attachments = $attachments.fullname
}
Send-MailMessage @Msg
}
【问题讨论】:
-
您可能会发现this answer 很有帮助
标签: powershell