Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.47 KB

File metadata and controls

53 lines (42 loc) · 1.47 KB

sendgridjp-ruby-example

This is an example of using the sendgrid-ruby gem.

Usage

git clone git@github.com:SendGridJP/sendgridjp-ruby-example.git
cd sendgridjp-ruby-example
cp .env.example .env
# change the values in .env
bundle install
ruby sendgridjp-ruby-example.rb

Change the values in .env

.env is here:

API_KEY=api_key
TOS=you@youremail.com,friend1@friendemail.com,friend2@friendemail.com
FROM=you@youremail.com

API_KEY: SendGrid API Key
TOS: Therecipient list that is comma seperated.
FROM: From address.

========================
本コードはsendgrid-ruby gemの利用サンプルです。

使い方

git clone git@github.com:SendGridJP/sendgridjp-ruby-example.git
cd sendgridjp-ruby-example
cp .env.example .env
# .envファイルを編集してください
bundle install
ruby sendgridjp-ruby-example.rb

.envファイルの編集

.envファイルは以下のような内容になっています。

API_KEY=api_key
TOS=you@youremail.com,friend1@friendemail.com,friend2@friendemail.com
FROM=you@youremail.com

API_KEY:SendGridのAPI Keyを指定してください。
TOS:宛先をカンマ区切りで指定してください。
FROM:送信元アドレスを指定してください。