Question

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.

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.

Is there a way to do this through 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.

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.

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()
Was it helpful?

Solution

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..

Updating my work computers anti-virus definitions(thought IT had it set up to go automatically, but i guess not) solved the problem.

Sorry for the late answer!

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top