0
如何发送电子邮件中的一些文本以及文件的内容,不想将文件作为附件发送?有没有可能通过mailx命令?如何使用mailx将文件发送为文本并向电子邮件正文添加额外的文本?
mailx -s "Email log file" [email protected] <$log_file;
$ LOG_FILE内容获取电子邮件,但低于不起作用
echo "Comment: log contains last month report" | mailx -s "Email log file" [email protected] < $log_file
电子邮件所需的输出:
Comment: Log contains last month report
<All contents of $LOG_FILE as text>
可能是http://stackoverflow.com/questions/2282506/how-can-i-send-an-email-through-unix-mailx-command的副本。至少,该链接回答了问题 – mpez0 2015-01-20 22:15:23
谢谢你会尝试一下。 – homer 2015-01-20 22:18:33