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 [email protected] -Subject "Server ESI-NIKE Has Rebooted" -To [email protected] -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 "[email protected]",(Get-Content -Path [email protected] | ConvertTo-SecureString))