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
This should fix your problem:
$credentials = New-Object Management.Automation.PSCredential “mailserver@yourcompany.com”, (“password” | ConvertTo-SecureString -AsPlainText -Force)
Then use the credential in your call to Send-MailMessage -From $From -To $To -Body $Body $Body -SmtpServer {$smtpServer URI} -Credential $credentials -Verbose -UseSsl