![邮件:无法发送消息:进程以非零状态退出](https://linux22.com/image/887583/%E9%82%AE%E4%BB%B6%EF%BC%9A%E6%97%A0%E6%B3%95%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%EF%BC%9A%E8%BF%9B%E7%A8%8B%E4%BB%A5%E9%9D%9E%E9%9B%B6%E7%8A%B6%E6%80%81%E9%80%80%E5%87%BA.png)
我已经在 Ubuntu 系统中设置了 mailutils 和 ssmtp。我已经配置了/etc/ssmtp/ssmtp.conf
正确的凭据。
为了测试我运行了这个命令
echo "This is a test" | mail -s "Test" mygmailid
但我收到了一个错误:
mail: cannot send message: Process exited with a non-zero status
我的密码中确实有特殊字符。
答案1
您不能使用正常密码来使用外部应用程序,您必须前往https://security.google.com/settings/security/apppasswords 并创建一个特殊的密码供您的邮件发件人使用。