- Library
cobra
- for cli app. - Sending email via smtp.
- Config file
config/esending.yaml
smtp:
host: "smtp.gmail.com"
port: 587
username: "quanhuynh1310@gmail.com"
password: "password"
tls_verify: true
- Gmail -> generate and use app-password (https://support.google.com/mail/answer/185833?hl=en)
data/customers/customers.csv
data/template/template.json
# Download all dependencies.
go mod download
# Build and run
go build -o main
./main send -c=data/customers/customers.csv -t=data/template/template.json -o=data/output.json -e=data/errors.csv
docker build -t esending .
docker run esending