Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 853 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 853 Bytes

sendgridjp-go-example

本コードはSendGrid公式Goライブラリの利用サンプルです。

使い方

git clone git@github.com:SendGridJP/sendgridjp-go-example.git
cd sendgridjp-go-example
cp .env.example .env
# .envファイルを編集してください
go run src/main/main.go

.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:送信元アドレスを指定してください。