Postman
Postman 是一个 CLI 工具,用于通过任何 SMTP 服务器批量发送邮件(所以你可以将 Postman 与你个人的 Gmail、Amazon SES、Sendgrid 或其他任何你喜欢的东西一起使用)。
特性
- 快速、模板化、大批量的电子邮件
- 从 CSV 中读取模板属性
- 可与任何 SMTP 服务器配合使用
为什么要比 cat | sed | sendmail < bcc distro_list 更重要?
- 支持邮件中的文本和 HTML 部分
- 模板在 Go 中的所有功能(条件等)。
- 如果 BCC 中的邮件太多,一些 SMTP 供应商会抱怨(一般来说,>1000)。
- 同时发送电子邮件
安装
$ go get github.com/zachlatta/postman
用法
$ postman [flags]
例子
$ postman -html template.html -text template.txt -csv recipients.csv \
-sender "Zaphod Beeblebrox <zaphod@beeblebrox.com>" \
-subject "Hello, World!" -server smtp.beeblebrox.com -port 587 \
-user zaphod -password Betelgeuse123
template.html:
Hello, {{.Name}}! You are a {{.Type}}
template.txt:
Email,Name,Type arthur@dent.com,Arthur Dent,Human ford@prefect.com,Ford Prefect,Alien martin@gpp.com,Martin,Robot trillian@mcmillan.com,Trillian,Human
请查看(并为之贡献)wiki 上的用法页面 以了解更多细节。
许可证
The MIT License (MIT)
Copyright (c) 2014-2020 Zach Latta