Connecting to Google app email servers in Python to send from an alias
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 (user@work.com) which is our login, but can't figure out how to send it through the alias (user@betterdomain.com) 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 (user@work.com) but send via a different email (user@betterdomain.com).
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).
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.
精彩评论