提问人:IC3Certified 提问时间:10/31/2023 最后编辑:tripleeeIC3Certified 更新时间:10/31/2023 访问量:27
在 Powershell 中创建寻呼电子邮件
Creating a Paging Email in Powershell
问:
我正在尝试为我的工作自动发送寻呼电子邮件。我是 Powershell 的新手,正在尝试更改我找到的电子邮件脚本。
模板:https://imgur.com/a/VHbkP1M
我要选择的电子邮件格式是:
Sender: [email protected]
Receiver: [email protected]
Subject: (1st,2nd,3rd) Shift Paging Log (Date)
Body:
Information Technology - Customer Support Center
2nd Shift Paging & Cell Call Log
10/30/2023
=========================================
SDM Incident Details
Ticket# Site is down
@time(user input) Paged (Oncall For Site) with this being user input
Ability to add multiple ticket pages
=========================================
VIP Incident Report
SDM#:(user input)_
Customer:(user input)
Status: (user input)
Group: (user input)
Description: (user input)
Ability to add multiple VIPS
=========================================
Tech 1 Support Technician
Tech 2 Support Technician
Tech 3 Support Technician
=========================================
[String]$Shift = Read-Host -Prompt 'Input the shift with the st or nd'
$Date = Get-Date
[String]$Page = Read-Host -Prompt 'Input the page with the time and ticket number.'
$sendSmtpAddress = "[email protected]"
$ol = new-object -comobject "outlook.application"
$account = $ol.session.accounts | ? { $_.smtpAddress -eq $sendSmtpAddress }
$mail = $ol.CreateItem(0)
$mail.recipients.add("[email protected]")
$mail.subject = $Shift-"Shift Page Log "-$Date
$mail.body = $Page
$mail.SendUsingAccount = $account
$mail.Send()
答: 暂无答案
评论