如何从Perl处理Google Mail中的二级身份验证?

时间:2022-05-19 18:13:56

This is a pure Google Mail question. I am accessing Google Mail via Perl's Net::SMTP::SSL module. From time to time the authentication fails not because of a bad password, but because of some additional password check. The only way to unlock it is via the web interface with an additional entry of text presented as an image. Has anyone seen a similar issue and knows a fix. I looked at the Google forums, but did not find anything.

这是一个纯粹的Google Mail问题。我通过Perl的Net :: SMTP :: SSL模块访问Google Mail。有时,验证失败不是因为密码错误,而是因为一些额外的密码检查。解锁它的唯一方法是通过Web界面,另外输入一个文本作为图像。有没有人见过类似的问题并知道修复。我查看了Google论坛,但没有找到任何内容。

1 个解决方案

#1


You are having this problem because the method you are using to access Gmail is not supported by Google and I am fairly sure it is a violation of their TOS (see 5.3). If you wish to access Gmail from inside of a program I would suggest using either its IMAP or POP3 interface with the appropriate Perl module.

您遇到此问题是因为Google不支持您用于访问Gmail的方法,而且我确信这违反了他们的服务条款(见5.3)。如果您希望从程序内部访问Gmail,我建议使用其IMAP或POP3接口以及相应的Perl模块。

Since you seem to be sending mail, you should use their SMTP interface with one of Perl's SMTP modules. You may find Google's information about setting up IMAP clients helpful.

由于您似乎在发送邮件,因此您应该将其SMTP接口与Perl的SMTP模块之一一起使用。您可能会发现Google有关设置IMAP客户端的信息很有帮助。

#1


You are having this problem because the method you are using to access Gmail is not supported by Google and I am fairly sure it is a violation of their TOS (see 5.3). If you wish to access Gmail from inside of a program I would suggest using either its IMAP or POP3 interface with the appropriate Perl module.

您遇到此问题是因为Google不支持您用于访问Gmail的方法,而且我确信这违反了他们的服务条款(见5.3)。如果您希望从程序内部访问Gmail,我建议使用其IMAP或POP3接口以及相应的Perl模块。

Since you seem to be sending mail, you should use their SMTP interface with one of Perl's SMTP modules. You may find Google's information about setting up IMAP clients helpful.

由于您似乎在发送邮件,因此您应该将其SMTP接口与Perl的SMTP模块之一一起使用。您可能会发现Google有关设置IMAP客户端的信息很有帮助。