[APAC]自动发送邮件

$lastMon = ((get-date).AddDays(-7) -split(" "))[0]
$lastFri = ((get-date).AddDays(-3) -split(" "))[0]
$emsno = Read-Host -Prompt "plz input EMS No."
$smtpserver = "172.17.8.52"
$sender = "chen.chen@abc.com"
$to = "simin.z@abc.com"
$cc = "chen.chen@abc.com"
$subject = "Pls Send backup media from Hangzhou to Shanghai"
$body = "Dear Lisa, Please send weekly backup tape ($lastMon -> $lastFri) to Shanghai office today by EMS couri The EMS NO. is: $emsno. yours,
"
Send-MailMessage -SmtpServer $smtpserver -From $sender -To $to -Cc $cc -Subject $subject -Body $body
上一篇:PhiloGL学习(6)——深情奉献:快乐的一家


下一篇:跟着刚哥学习Spring框架--创建HelloWorld项目(一)