Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $gmailServer = "smtp.gmail.com"
- $outlookServer = "smtp.live.com"
- #Send-MailMessage -SmtpServer $emailServer -Subject "asdfaf" -From [email protected] -To [email protected] -Body "This is a test" -UseSsl true
- #$credential = Get-Credential
- #$googleCredential = Get-Credential
- #$secpasswd = ConvertTo-SecureString "ThePassword" -AsPlainText -Force
- $encrypted = ConvertFrom-SecureString -SecureString $secpasswd
- $encrypted
- $x2 = ConvertTo-SecureString -String $encrypted
- #$outlookCredential = $credential
- $outlookCredential = $mycreds
- $Content = "I will be absolutely delighted if this xxx does manage to work, as it will be a first no SSL"
- $htmlContent = ConvertTo-Html -Body $Content
- $htmlContent
- #Send-MailMessage -smtpServer smtp.live.com -Credential $credential -Usessl $Content -from '[email protected]' -to '[email protected]' -subject 'Testing'
- #Send-MailMessage -smtpServer $emailServer -Credential $googleCredential -Usessl -from $sender -to '[email protected]' -subject 'Testing' -BodyAsHtml $Content
- Send-MailMessage -smtpServer $outlookServer -Credential $mycreds -Usessl -from $hotmailSender -to '[email protected]' -subject 'Testing' -BodyAsHtml -Body $Content
- #Send-MailMessage -smtpServer $emailServer -Credential $googleCredential -Usessl $Content -from $sender -to '[email protected]' -subject 'Testing'
- #Send-MailMessage -smtpServer $emailServer -Credential $googleCredential -from $sender -to '[email protected]' -subject 'Testing' -BodyAsHtml $Content
Advertisement
Add Comment
Please, Sign In to add comment