如何在gmail smtp身份验证中使用用户别名?

问题描述 投票:3回答:2

我正在使用Drupal 7和SMTP模块。 Gmail(Apps for work)帐户使用2步验证和应用密码,以便网站可以使用SMTP进行身份验证。好到目前为止。

问题是用户帐户,比如[email protected]不应该是来自地址,但[email protected]应该。 info已经是johndoe的工作别名。

我们必须使用johndoe来实际验证,别名对此不起作用。但是,虽然调试中的起始地址是[email protected],但在我的邮件应用程序中,发件人似乎仍然是[email protected]

有任何想法吗?

编辑:我读过Google SMTP服务会覆盖用户帐户的发件人地址。即使起始地址是现有别名?

这真的很奇怪。

email drupal-7 smtp gmail
2个回答
2
投票

请尝试在Gmail中添加别名电子邮件地址。

打开gmail =>设置=>帐户=>发送电子邮件为:=>添加另一个电子邮件地址

Gmail会将确认代码发送到别名电子邮件。添加别名地址后,gmail smtp将使用您的别名地址接受“from”参数。


0
投票

如果我了解你,如果你想使用该帐户([email protected])进行身份验证,但你不希望它显示为发件人,而发件人应该是([email protected]),那么你必须遵循以下步骤。

您必须是GSuite管理员才是显而易见的。首先启用第三方身份验证,请转到:

Google GSuite Security=>
basic configuration=> 
Unsecured applications=>
(click here) Access the settings of unsafe applications=>
Enable access for all users to unsafe applications (not recommended)

Second, in your application for sending mail do this:
Sender Address: [email protected]
User: [email protected]
Server: smtp.gmail.com
Port: 465
Encryption: ssl
Password: yourpassowrdaccount

示例:qazxsw poi

© www.soinside.com 2019 - 2024. All rights reserved.