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