Created
December 12, 2020 12:54
-
-
Save Allwin12/f2b788ac7433263176cb28e24a0b2300 to your computer and use it in GitHub Desktop.
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
import os | |
from sendgrid import SendGridAPIClient | |
from sendgrid.helpers.mail import Mail | |
message = Mail( | |
from_email="verified_email@gmail.com", | |
to_emails="receiver@gmail.com", | |
subject="test", | |
html_content="<p>hi</hi>" | |
) | |
try: | |
sg = SendGridAPIClient("XXXX API key XXXXXX") | |
response = sg.send(message) | |
except Exception as e: | |
print(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment