I am attempting to use the following Python code to send an email through an outlook server however I get a pop up indicating "A program is trying to send an e-mail message on your behalf.
If this is unexpected, click Deny and verify your antivirus software is up-to-date." I know that this can be disabled in outlook settings however I am unable to as I do not have administrator access.
My question I there any way to programmatically handle/avoid this through python? I am also aware this can be avoiding by using smtplib
however I am unable to connect to my server through that so it is also not a solution.
import win32com.client
olMailItem = 0x0
obj = win32com.client.Dispatch("Outlook.Application")
newMail = obj.CreateItem(olMailItem)
newMail.Subject = "Test Subject"
newMail.Body = "Test Body"
newMail.To = "[email protected]"
newMail.Send()
This feature cannot be disabled by an end-user. The prompt will be displayed if you have an up-to-date anti-virus app on your system. If you cannot control the user environment, you options are listed at http://www.outlookcode.com/article.aspx?id=52
Essentially in PHP you are limited to either Redemption (I am its author), Outlook Security Manager, or ClickYes.