I\'m trying to figure out how to use PowerShell V2\'s Send-MailMessage with Gmail.
Here\'s what I have so far.
$ss = New-Object Security
After many tests and a long search for solutions, I found a functional and interesting script code at #PSTip Sending emails using your Gmail account:
$param = @{
SmtpServer = 'smtp.gmail.com'
Port = 587
UseSsl = $true
Credential = 'you@gmail.com'
From = 'you@gmail.com'
To = 'someone@somewhere.com'
Subject = 'Sending emails through Gmail with Send-MailMessage'
Body = "Check out the PowerShellMagazine.com website!"
Attachments = 'D:\articles.csv'
}
Send-MailMessage @param