This is an example of using the sendgrid-ruby gem.
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
.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ファイルは以下のような内容になっています。
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:送信元アドレスを指定してください。