Send Email From Specific Outlook Account Via Python?

左心房为你撑大大i 提交于 2019-12-04 19:30:43
Eugene Astafiev

The Outlook object model doesn't provide anything for configuring profiles. However, if you have an account configured in Outlook you may find the SendUsingAccount property of the MailItem class helpful. It allows to set an Account object that represents the account under which the MailItem is to be sent.

You may find the following links helpful:

As Eugene suggested, you can either manually create a POP3/SMTP account and assign it to the MailItem.SendUsingAccount property prior to calling Send, or you can create a new POP3/SMTP account dynamically using Redemption and its RDOSession.Accounts.AddPOP3Account method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!