/ruby-email-send

Send an email with the Nylas Ruby SDK!

Primary LanguageRubyMIT LicenseMIT

ruby-email-send

This sample will show you to easily send your email with the Nylas Ruby SDK.

You can follow along step-by-step in our blog post "How to Read Email Inbox Data with the Nylas Ruby SDK".

Setup

System dependencies

  • Ruby v3.x

Gather environment variables

You'll need the following values:

NYLAS_API_KEY=
NYLAS_API_URI=
NYLAS_GRANT_ID=
RECIPIENT_EMAIL=

Add the above values to a new .env file:

$ touch .env # Then add your env variables

Install dependencies

$ gem install nylas
$ gem install dotenv

Usage

Run the script using the ruby command:

$ ruby SendEmail.rb

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

Learn more

Visit our Nylas Ruby SDK documentation to learn more.