[英]How can I register my python program with Outlook to send mail without interference
EDIT: THIS IS MORE OF AN OUTLOOK QUESTION / I HAVE ANSWERED THIS BELOW. 编辑:这是展望问题的更多内容/我已经在下面回答了。
I may have phrased my question a little bit oddly(not exactly sure how to word it), but I am using the win32com.client module of pywin32 to parse my emails, extract relevant data and add that data to a listbox. 我可能有点奇怪地提出了我的问题(不确定如何措词),但是我正在使用pywin32的win32com.client模块来解析我的电子邮件,提取相关数据并将该数据添加到列表框中。
When I remove the data from the listbox, my application sends an email to whoever sent me the relevant data informing them that i completed the task. 当我从列表框中删除数据时,我的应用程序会向发送给我相关数据的任何人发送电子邮件,通知他们我已完成任务。
The only issue I'm running into is that I have to allow my software to send mail on my behalf each time my software sends a message. 我遇到的唯一问题是,每次软件发送消息时,我都必须允许我的软件代表我发送邮件。 I want to register my application with Outlook so that it knows my application is allowed to send mail.
我想在Outlook中注册我的应用程序,以便它知道我的应用程序可以发送邮件。
Is there a way to do this through python? 有没有办法通过python做到这一点? I'm not sure if I'm not phrasing the question correctly when I look on google, or if it is even possible to do.
我不确定当我在Google上浏览时是否无法正确表达问题,或者是否有可能这样做。
If this is an Outlook question, I apologize, I have looked at how to accomplish this on both sides with no clear answer as of yet, but I'm still searching. 我很抱歉,如果这是一个Outlook问题,我已经研究了如何以双方的方式完成此工作,但目前尚无明确答案,但我仍在寻找。
Thanks in advance to anyone who can point me in the right direction. 在此先感谢任何可以向我指出正确方向的人。
Example: 例:
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(6)
messages = inbox.Items
message = messages.GetLast()
while message:
#check all sorts of stuff / if it passes everthing proceeds...
message_reply = message.Reply()
message_reply.Body = "THE FOLLOWING TASK HAS BEEN MARKED AS COMPLETED: \n\n" + task
message_reply.Send()
message = messages.GetPrevious()
This is an outlook question. 这是一个前景问题。
File>Options>Trust Center>Trust Center Settings>Programmatic Access. 文件>选项>信任中心>信任中心设置>程序访问。
The computer I'm working off of at work does not have anti-virus(imagine that..), so it will not allow a user to change the settings. 我正在使用的计算机没有防病毒软件(想象一下..),因此它将不允许用户更改设置。
If you have anti-virus software that is up to date, you can change these options. 如果您拥有最新的防病毒软件,则可以更改这些选项。
The solution is to make sure virus protection is up to date. 解决方案是确保病毒防护是最新的。 There are no options to set to stop the behavior, you just simply need up-to-date virus protection.
没有设置任何选项来阻止该行为,您只需要最新的病毒防护即可。
If you don't have up to date anti-virus software Outlook will ask for permission each time a program wants to send an email on your behalf.. 如果您没有最新的防病毒软件,则每当程序要代表您发送电子邮件时,Outlook都会要求获得许可。
Updating my work computers anti-virus definitions(thought IT had it set up to go automatically, but i guess not) solved the problem. 更新我的工作计算机的防病毒定义(IT曾将它设置为自动运行,但我想不是)解决了该问题。
Sorry for the late answer! 抱歉回复晚了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.