首先,Linux 上配置安装mailx 或 postfix 软件。
然后使用 mailx 或 sendmail 发邮件。
(
echo "To: lipeng20004@126.com"
echo "Subject: The Subject"
echo "Content-Type: text/html"
echo
cat ./part.html
) | sendmail -t
mailx -s "$(echo -e "subject\nContent-Type: text/html; charset=utf-8")" lipeng20004@126.com < part.html
mailx -s "$(echo -e "subject\nContent-Type: text/html; Charset=GB2312")" lipeng20004@126.com < part.html
echo "ttt" | mailx -s "email title: test mail" lipeng20004@126.com
Copyright © 2002 myarticle.com.cn |
备案号:浙ICP备17002154号-3 Powered by: MyArticle Version 1.0dev
|