Skip to content

Instantly share code, notes, and snippets.

@CoreyWycliffe
Created July 12, 2018 17:11
Show Gist options
  • Save CoreyWycliffe/44a09ef8e6b12412c3dfed72a6d12cd3 to your computer and use it in GitHub Desktop.
Save CoreyWycliffe/44a09ef8e6b12412c3dfed72a6d12cd3 to your computer and use it in GitHub Desktop.
Send Email through Sendgrid using Powershell
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
@CoreyWycliffe
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment