Linux下使用sendEmail发送带附件的邮件

sendEmail是一个轻量级,命令行的SMTP邮件客户端。如果你需要使用命令行发送邮件,那么sendEmail是非常完美的选择:使用简单并且功能强大.这个被设计用在php、bash、perl和web站点使用。 以上是sendEmail的简单介绍,千万不要和sendmail搞混掉了。用了sendEmail你将不在喜欢sendmail了. 安装sendEmail 请参考 如何使用sendEmail发送邮件,里面有具体安装方法. 发送邮件
#  /usr/local/bin/sendEmail -f [email protected] -t [email protected] \
    -s smtp.163.com -u "我是邮件主题-发送附件" -o message-content-type=html \
    -o message-charset=utf8 -a /data/site/ttlsa.rar -xu [email protected] \
    -xp 123456 -m "我是邮件内容-详见附件"
发送成功之后会有如下提示: Jul 29 15:02:53 e10074 sendEmail[26347]: Email was sent successfully! 命令说明:
/usr/local/bin/sendEmail 命令主程序
-f [email protected]  发件人邮箱
-s smtp.163.com       发件人邮箱的smtp服务器
-u "我是邮件主题"     邮件的标题
-o message-content-type=html   邮件内容的格式,html表示它是html格式
-o message-charset=utf8        邮件内容编码</pre>
-a /data/site/a.rar             发送ttlsa.rar这个文件
-xu [email protected]          发件人邮箱的用户名
-xp 123456               发件人邮箱密码
-m "我是邮件内容"        邮件的具体内容
转摘请注明出处: http://www.ttlsa.com/html/1879.html

转载于:https://my.oschina.net/766/blog/211435

猜你喜欢

转载自blog.csdn.net/weixin_33736649/article/details/91546438
今日推荐