简体   繁体   English

如何在Outlook中注册python程序以发送邮件而不会受到干扰

[英]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.

相关问题 如何用python打开pst文件(outlook邮件文件)? - How can i open pst file (file of outlook mail ) with python? 如何在我的Python程序的* success *退出时注册要调用的函数? - How can I register a function to be called only on *successful* exit of my Python program? 我如何在没有外部服务器的情况下在优胜美地上通过Python发送邮件? - How can I send mail via Python on Yosemite… without an outside server? 如何在我的桌面(Windows 7)上使用python程序在我的桌面上显示简单的通知,而无需notify2,notify-send,pqt5? - How can I use my python program on my desktop (windows 7) to display a simple notification on my desktop without notify2, notify-send, pqt5? 如何使用 Python 从 Outlook 帐户发送带有附件的邮件 - how to Send mail with attachment from your outlook account using Python 如何在Outlook中使用python将电子邮件与收件人作为Microsoft邮件发送电子邮件? - How to send email using python in outlook with recipient as microsoft mail? 我正在尝试使用 Python 和 outlook 发送邮件,但在 mail.Send() 结束时出现错误 - I am trying to send mail using Python and outlook but getting error at end at mail.Send() 如何使用python脚本发送邮件? - How can I send mail using python script? 如何保持登录网站并发送cookie或http标头或我的python程序之类的东西? - How can I stay logged in to a website and send a cookie or http header or something for my python program? 如何创建全新的对象而不干扰python中的旧对象? - How do I create completely new objects without any interference with old objects in python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM