如何在电子邮件中发送一些文本以及文件的内容,不想将文件作为附件发送?可以通过mailx命令吗?
mailx -s "Email log file" abc@mail.com <$log_file;
$log_file 内容通过电子邮件发送但以下不起作用
echo "Comment: log contains last month report" | mailx -s "Email log file" abc@mail.com < $log_file
电子邮件中需要的输出:
Comment: Log contains last month report
<All contents of $LOG_FILE as text>