Skip to main content
added 1 character in body
Source Link
Tom
  • 107
  • 8
Send-MailMessage -smtpServer 'smtp.gmail.com' -port 587 -from '[email protected]' -to '[email protected]' -subject 'Test' -body 'Body' –UseSsl -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "myUsername", (ConvertTo-SecureString -String "myPassword" -AsPlainText -Force)) 
Send-MailMessage -smtpServer 'smtp.gmail.com' -port 587 -from '[email protected]' -to '[email protected]' -subject 'Test' -body 'Body' –UseSsl -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "myUsername" (ConvertTo-SecureString -String "myPassword" -AsPlainText -Force)) 
Send-MailMessage -smtpServer 'smtp.gmail.com' -port 587 -from '[email protected]' -to '[email protected]' -subject 'Test' -body 'Body' –UseSsl -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "myUsername", (ConvertTo-SecureString -String "myPassword" -AsPlainText -Force)) 
Source Link
Tom
  • 107
  • 8

Send-MailMessage -smtpServer 'smtp.gmail.com' -port 587 -from '[email protected]' -to '[email protected]' -subject 'Test' -body 'Body' –UseSsl -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "myUsername" (ConvertTo-SecureString -String "myPassword" -AsPlainText -Force))