This project will show you how to create a Mail Merge Template using Ruby and Sinatra.
- Ruby 3.1.1 or greater
You'll need the following values:
CLIENT_ID = ""
CLIENT_SECRET = ""
ACCESS_TOKEN = ""
Add the above values to a new .env
file:
$ touch .env # Then add your env variables
$ gem install dotenv
$ gem install sinatra
$ gem install sinatra-flash
$ gem install nylas
$ gem install webrick
Clone the repository. Go to your terminal and type:
$ ruby MailMerge.rb
Create an .csv file with information like this:
Name | Last_Name | Account | Address | Email | Gift
The only "mandatory" fields are: Name and Email. You can delete, update or create new fields.
And go to http://localhost:4567
You will presented with a form, enter the Subject, Body and select the .csv file that you're going to use and simply press submit to start sending personlized emails.