使用 Python 连接到 Google 应用电子邮件服务器以从别名发送
我希望通过 Python 发送许多电子邮件,并希望连接到 Google 的电子邮件服务器以从我公司的电子邮件地址发送(用于工作)。我有通过旧公司电子邮件发送电子邮件的工作代码 ([email protected] )这是我们的登录名,但不知道如何通过别名([电子邮件受保护])我们经常使用。
长话短说,使用我的常规 Google Apps 帐户登录是行不通的,我需要使用别名(昵称)登录。或者,我可以使用常规帐户 ([email protected]) 进行签名,但是通过其他电子邮件发送([电子邮件受保护])。
使用 python 工作,对编程相当陌生,但我是一个很好的倾听者! (就像这个问题:Google Apps - 使用昵称发送电子邮件但在Python中)。
I'm looking to send many emails via Python and would like to connect to Google's email servers to send it from my company email address (it's for work). I've got working code for sending the email through the old company email ([email protected]) which is our login, but can't figure out how to send it through the alias ([email protected]) we use frequently.
Long story short, logging in with my regular Google Apps account won't do and I need to sign in with an alias (nickname) instead. Alternatively, I can sign with the regular account ([email protected]) but send via a different email ([email protected]).
Working in python and pretty new to programming, but am a good listener! (It's like this question: Google Apps - Send email from a nickname but in Python).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确,您要做的就是让 Google App Engine 代表登录用户发送一封电子邮件,该用户正在使用其 Google Apps 帐户名登录。对吗?
在这种情况下,App Engine 的邮件 API 会通知
mail.send_mail()
其中 From: 地址可以是当前用户(如果使用 Google 帐户登录)。如果这不是您想要的,则可能需要进行一些说明。If I understand properly, what you are trying to do is get the Google App Engine send an email on behalf of logged in user, who is using his Google Apps Account name to login. Is it right?
In that case, the mail API for App Engine informs about the
mail.send_mail()
wherein From: address can be the current user if signed in with Google Accounts. If this is not what you are looking for, some clarification might be required.