v5.12.0
This release of the Nylas Python SDK brings a single addition.
Release Notes
Added
- Add support for sending raw MIME messages (#243)
Usage
Sending raw MIME messages
from nylas import APIClient
nylas = APIClient(
CLIENT_ID,
CLIENT_SECRET,
ACCESS_TOKEN
)
raw_mime = """MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Subject: With Love, From Nylas
From: You <example@gmail.com>
To: My Nylas Friend <recipient@gmail.com>
This email was sent via raw MIME using the Nylas email API. Visit https://nylas.com for details.
"""
draft = nylas.drafts.create()
# Send the raw MIME
msg = draft.send_raw(raw_mime)