Skip to content

v5.12.0

Compare
Choose a tag to compare
@mrashed-dev mrashed-dev released this 16 Dec 17:31
· 33 commits to main since this release

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)