Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29947

Sending SMTP Mail Through Gmail Using Powershell

$
0
0

I had this working at one time, but it stopped a while ago. The password for the account is valid, and noting in my script has changed.

Send-MailMessage -From ESI-NIKE@gisx.com -Subject "Server ESI-NIKE Has Rebooted" -To Glen.krinsky@xerox.com -Attachments C:\1\Reboot\Previous5.txt -Body "ESI-NIKE has rebooted.  Please check the Event Log if this reboot is unexpected" -SmtpServer smtp.gmail.com -Port 587 -usessl -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "zz.gms.service@gmail.com",(Get-Content -Path zz.gms.service@gmail.com.securestring | ConvertTo-SecureString))

Viewing all articles
Browse latest Browse all 29947

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>