[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