table of Contents
installation
sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl sendemail
use
Get the SMTP verification code of the mailbox (here is the qq mailbox)
Open the POP3 / SMTP service, and then you can see your authorization code
send email
sendemail -f ADDRESS [options]
-f ADDRESS # 发件人地址,注意此地址应该是你真实地址
-t ADDRESS # 收件人地址
-u SUBJECT # 主题
-m MESSAGE # 邮件正文
-s SERVER[:PORT] # SMTP服务器地址及端口
-a FILE [FILE ...] # 附件
-cc ADDRESS [ADDR ...] # 抄送地址
-bcc ADDRESS [ADDR ...] # 暗抄送地址
-xu USERNAME # SMTP服务器用户名
-xp PASSWORD # SMTP服务器密码
-o # 其它选项
Examples:
sendemail -f 这里是发送者邮箱 -t 这里是接收者邮箱 -u "这里是显示标题" -s smtp.qq.com -o tls=yes -xu [email protected] -xp utntqqasbxineiij -m "这里是正文内容"
Sent successfully:
OK.