swaks 的GitHub仓库是https://github.com/jetmore/swaks

文档地址是 https://github.com/jetmore/swaks/blob/v20201014.0/doc/base.pod

在 Centos 上安装挺方便:

yum -y install swaks

张三向李四发送带两个附件的邮件:

swaks -to [email protected] -from [email protected] -header "Subject:邮件标题" -body '邮件正文'  -server smtp.gmail.com -attach /tmp/file1.txt -attach /tmp/file2.txt