如何使用netcat发送带有彩色文本emil的html格式我不需要发送邮件方法只想使用netcat以及如何正确添加头我创建一个脚本来发送带有彩色文本的邮件,这个脚本发送只有带有html标签而不带颜色的电子邮件才能指出我在这里做错了什么
function mail_input {
echo "ehlo $(hostname -f)"
echo "MAIL FROM: <$from>"
echo "RCPT TO: <$to>"
# echo "RCPT TO: <$to1>"
#echo "RCPT TO: <$to2>"
#echo "RCPT TO: <$to3>"
# echo "RCPT TO: <$to4>"
echo "DATA"
echo "From: <$from>"
echo "To: <$to>"
#echo "cc: <$to1>"
#echo "cc: <$to2>"
#echo "cc: <$to3>"
# echo "cc: <$to4>"
echo "Subject: $subject"
echo ""
echo -e "HTTP/1.1 200 OK\r"
echo `Content-type: text/html`
echo "Dear All,"
echo ""
echo "<html><b><font size='7'>H</font>ello</b></html>"
echo "<font color=\"red\"> mandate count first re try $revenue </font> "
echo ""
echo "."
echo "quit"
}
mail_input | /usr/bin/nc $mail_server $port || err_exit
答案 0 :(得分:0)
str = sprintfc('%i',x)
标记嵌入到纯文本中,这肯定会弄乱用户代理。html
代码。html
标记。最小的HTML文档看起来像这样(它取决于HTML的版本以及用户代理是否可以处理丢失的某些内容):
body