[ Home ] [ Tech Tips ] [ Raspberry Pi ] [ Powershell ] [ Ubuntu ] [ Django ] [ About ]
Powershell using Send-MailMessage to send email

Powershell | using Send-MailMessage to send email 

$UserName = “[email protected] ”
$Password = Get-Content .\SecurePassword.txt | ConvertTo-SecureString
$Credential = New-Object -TypeName System.Management.Automation.PSCredential `
-ArgumentList $UserName, $Password
# Send-MailMessage Email
Send-MailMessage -To [email protected] -From [email protected] -Credential $Credential -SmtpServer test.techgeek.biz -UseSsl -Subject “Backup -Body “Backup script completed”


Luke Keam
Thank you for reading. Any questions, comments or suggestions email me [email protected]
Luke Keam
techgeek.biz

FOLLOW US

Name
Email:

AD

quick-time-management logo.biz

Quick-Time-Management.com

We strive to make you healthy and productive for the long haul. Easily look back and see how you effective you have been.