如何使用bash命令"sendmail"发送html电子邮件? [英] How to send a html email with the bash command "sendmail"?

查看:111
本文介绍了如何使用bash命令"sendmail"发送html电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以使用演示吗?

Anyone has a demo available?

Sendmail据说是不可扩展的,但是它是免费的,所以我决定暂时先使用它:)

Sendmail is said to be not scalable,but it's free,so I decided to use it first for now:)

推荐答案

我无法获得任何已发布的解决方案,但最终在其他地方找到了它,并且效果很好:

I couldn't get any of the posted solutions to work, but finally found this elsewhere, and it works great:

(
echo "From: ${from}";
echo "To: ${to}";
echo "Subject: ${subject}";
echo "Content-Type: text/html";
echo "MIME-Version: 1.0";
echo "";
echo "${message}";
) | sendmail -t

这篇关于如何使用bash命令"sendmail"发送html电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆