Skip to content

Instantly share code, notes, and snippets.

@sendgrid-gists
Last active May 11, 2016 17:46
Show Gist options
  • Save sendgrid-gists/25a7f00db3f75026602583ed132c500d to your computer and use it in GitHub Desktop.
Save sendgrid-gists/25a7f00db3f75026602583ed132c500d to your computer and use it in GitHub Desktop.
"Hello World" for email, using SendGrid with Python.
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import sendgrid
client = sendgrid.SendGridClient("SENDGRID_APIKEY")
message = sendgrid.Mail()
message.add_to("[email protected]")
message.set_from("[email protected]")
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