Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

nylas-samples/node-email-read

Repository files navigation

node-email-read

This sample will show you to easily read your email with the Nylas Node.js SDK.

Setup

System dependencies

  • Node.js v16.x

Gather environment variables

You'll need the following values:

ACCESS_TOKEN = ""
CLIENT_ID = ""
CLIENT_SECRET = ""
RECIPIENT_ADDRESS = ""

Add the above values to a new .env file:

$ touch .env # Then add your env variables

Install dependencies

$ npm i

Usage

Run the script using the node command:

$ node index.js

When your messages are successfully read, you'll get the following output in your terminal for a few emails:

[4/7/YYYY] Here's an email subject
[4/6/YYYY] Another subject

Learn more

Visit our Nylas Node.js SDK documentation to learn more.