0
我在bash脚本中输入了以下内容。避免bash脚本等待用户输入回车键
echo "Please see attached file" | mailx -S smtp=$smtpServer -s "Subject of the mail" -a $logfile -r "[email protected]" [email protected] [email protected]
它的工作正常,如果没有发送邮件的错误。但有时如果出现错误,mailx将显示错误消息并等待用户输入回车键(回车)。我想避免这种情况,不应等待用户输入回车键。如何在bash脚本中做到这一点?
将本地邮件服务器配置为中继到$ smtpServer。 – Cyrus