This sample will show you to easily send an email with the Nylas Python SDK.
You can follow along step-by-step in our blog post "How to Send Emails with the Nylas Python SDK".
- Python v3.x
You'll need the following values:
V3_API_KEY = ""
GRANT_ID = ""
RECIPIENT_NAME = ""
RECIPIENT_ADDRESS = ""
Add the above values to a new .env
file:
$ touch .env # Then add your env variables
$ pip3 install nylas
Run the script using the python3
command:
$ python3 SendEmail.py
When your message is successfully sent, you'll get the following output in your terminal:
Message "With Love, from Nylas" was sent with ID 111111111111111111
Visit our Nylas Python SDK documentation to learn more.