Created
June 6, 2015 07:51
-
-
Save shane0/5512d8900705424365c9 to your computer and use it in GitHub Desktop.
powershell send mail using gmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$param = @{ | |
SmtpServer = 'smtp.gmail.com' | |
Port = 587 | |
UseSsl = $true | |
Credential = Get-Credential [email protected] | |
From = '[email protected]' | |
To = '[email protected]' | |
Subject = 'editme' | |
Body = "editme" | |
Attachments = c:\file.txt | |
} | |
Send-MailMessage @param |
Author
shane0
commented
Nov 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment