发送HTML页面作为电子邮件使用"狗" [英] Send Html page As Email using "mutt"
问题描述
我一直用狗来发送从其他应用程序和放大器内部电子邮件;
它工作正常。我要发送HTML文件,目前我有送
它们作为附件。所以我用
I have been using mutt to send emails from inside another application & it works fine. I have to send html files and currently I have to send them as attachments. So I use
mutt -s "hi" -a attach.html user@domain.com < /dev/null
但是,如果我尝试将HTML文件发送因为身体如下:
But if I try to send the html file as the body as follows
mutt -e content_type=text/html Email address -s "subject" < test.html
然后,而不是HTML文件我得到的HTML文件的源文本。
then instead of the html file i get the source text of the html file.
有什么办法,我可以使邮件的正文为html
而不是纯文本???
Is there any way that I can make the body of the message as html instead of plain text???
推荐答案
当我尝试你的指挥,狗是告诉我, CONTENT_TYPE = text / html的
是一个未知的命令。所以,你必须使用设置命令,使这项工作:
When I try your command, mutt is telling me that content_type=text/html
is an unknown command. So you have to use the "set" command to make this work:
mutt -e "set content_type=text/html" Email address -s "subject" < test.html
这在我的测试工作。
这篇关于发送HTML页面作为电子邮件使用&QUOT;狗&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!