📜  powershell send-mailmessage authentication - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:01.706000             🧑  作者: Mango

代码示例1
Send-MailMessage -From "username@myisp.net" -To "robin@rcmtech.co.uk" -Subject "Something interesting just happened" -Body "Here's the details about the interesting thing" -SmtpServer smtp.myisp.net -Port 587 -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "username@myisp.net",(Get-Content -Path username@myisp.net.securestring | ConvertTo-SecureString))