2015-11-07 92 views
3

我想发送自动电子邮件从我的覆盆子pi。我是因为我没有使用现代化的安全遵循这个指南https://wiki.archlinux.org/index.php/SSMTP覆盆子pi gmail登录被谷歌拦截

我试图发送电子邮件

~>cat tmp.txt | mail -s "subject" -t [email protected] 
    mail: cannot send message: Process exited with a non-zero status 

我也得到了被阻止谷歌从告诉我一登录尝试的电子邮件时出错标准:enter image description here

我应该使用不同的发送电子邮件还是应该使用不同的电子邮件服务?

回答

3

您可以转到该Gmail帐户设置并查找“允许安全性较低的应用程序”并将其打开。

myaccount.google.com -> "Sign-in & security" -> "Allow less secure apps: ON" 

,让您以更少的安全登录程序发送电子邮件。

enter image description here

否则,我看到一些帖子里面说this帮助有关python 2.7

编号:https://www.raspberrypi.org/forums/viewtopic.php?t=94023&p=659005

1

启用不够安全的应用没有帮助我。

不过,我发现,如果我打开2-factor auth并设置app-specific password然后我可以成功登录到我的Gmail帐户。