@taygibb I am having problems getting this to work. this is the arguments i used minus the password for the email account
-Command “Send-MailMessage -From “firstname.lastname@example.org” -To “email@example.com” -Body “$env:USERNAME Just Logged In” -Subject “LOGIN” -SmtpServer “smtp.gmail.com” -Port 587 -Credential $(New-Object System.Management.Automation.PSCredential (firstname.lastname@example.org, $(ConvertTo-SecureString “PASSWORD” -AsPlainText -Force))) –UseSsl”
Task Scheduler has listed the task as being successfully run but i have not gotten an email. I am unsure what is wrong. Please help?