选择“来自".领域使用python win32com Outlook [英] Choosing "From" field using python win32com outlook
问题描述
我正在尝试使用python自动处理电子邮件.不幸的是,我工作的网络管理员阻止了SMTP中继,因此我无法使用该方法发送电子邮件(它们是从外部发送的).
I am trying to automate emails using python. Unfortunately, the network administrators at my work have blocked SMTP relay, so I cannot use that approach to send the emails (they are addressed externally).
因此,我正在使用win32com通过Outlook自动发送这些电子邮件.除了一件事,这工作正常.我想在我的python代码中选择"FROM"字段,但我根本无法弄清楚该怎么做.
I am therefore using win32com to automatically send these emails via outlook. This is working fine except for one thing. I want to choose the "FROM" field within my python code, but I simply cannot figure out how to do this.
任何见识将不胜感激.
推荐答案
如果配置了单独的POP3/SMTP帐户,请将MailItem.SendUsingAccount
属性设置为Namespace.Accounts
集合中的帐户.
If you configured a separate POP3/SMTP account, set the MailItem.SendUsingAccount
property to an account from the Namespace.Accounts
collection.
如果您代表Exchange用户发送邮件,请设置MailItem.SentOnBehalfOfName
属性
If you are sending on behalf of an Exchange user, set the MailItem.SentOnBehalfOfName
property
这篇关于选择“来自".领域使用python win32com Outlook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!