1
我想创建一个脚本,将能够轻松地发送邮件与用户的选择。脚本telnet邮寄
我这样做,但它不工作
mail_sender()
{
echo " - FROM : "
read from
echo " - TO : "
read to
echo " - Subject : "
read subject
echo " - Message : "
read message
telnet localhost 25
ehlo triton.itinet.fr
mail from: $from
rcpt to: $to
data
subject: $subject
$message
.
}
你有一个想法?
它显示任何错误信息? – Jdamian
我想你应该学习[bash here文档](http://www.gnu.org/software/bash/manual/bash.html#Here-Documents)。 – Jdamian
你知道[mailx命令](http://stackoverflow.com/questions/2282506/how-can-i-send-an-email-through-unix-mailx-command)吗? – Jdamian