在 Linux 中替代 mail 或 mutt 发送邮件?

Alternative to mail or mutt in Linux to send mail?

我有一台没有邮件客户端的 CentOS 服务器。我没有安装它或安装 mutt 的 sudo 权限。

我可以用来向自己发送电子邮件以通知 failure/success 我在此服务器上 运行 的进程的最佳替代方法是什么?

试试这个:

/bin/mail -s "Enter Subject Line here" -a /home/.../whateverFileYouWantAttached "you@YourEmailAddress" < /home/me/textBody.letter

也许您可以在 Python 中编写一个快速脚本来完成这项工作。 Python 肯定已经安装了,您将能够使用标准库完成整个工作。这是一个作为起点的小例子:https://docs.python.org/2/library/email-examples.html 问候。