Created
July 12, 2018 17:11
-
-
Save CoreyWycliffe/44a09ef8e6b12412c3dfed72a6d12cd3 to your computer and use it in GitHub Desktop.
Send Email through Sendgrid using Powershell
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
Send-MailMessage -To (Read-Host -Prompt 'Enter to: address') -From (Read-Host -Prompt 'Enter from: address') -Subject (Read-Host -Prompt 'Enter subject') -Body (Read-Host -Prompt 'Enter email body') -SmtpServer "smtp.sendgrid.net" -Credential apikey -Port 587 -UseSsl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
must create API Key through Sendgrid. This script can run in one line and will ask for your input. You can modify it how you please.