Last active
May 11, 2016 17:46
-
-
Save sendgrid-gists/25a7f00db3f75026602583ed132c500d to your computer and use it in GitHub Desktop.
"Hello World" for email, using SendGrid with Python.
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
# using SendGrid's Python Library | |
# https://github.com/sendgrid/sendgrid-python | |
import sendgrid | |
client = sendgrid.SendGridClient("SENDGRID_APIKEY") | |
message = sendgrid.Mail() | |
message.add_to("test@sendgrid.com") | |
message.set_from("you@youremail.com") | |
message.set_subject("Sending with SendGrid is Fun") | |
message.set_html("and easy to do anywhere, even with Python") | |
client.send(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment