How can I avoid Outlook's security warning when sending email programmatically?
Asked Answered
P

3

6

I send email through Outlook using VB.Net 2005; this is working fine.
At the same time, however, I receive the following message:

A program is trying to automatically send Email on your behalf.
Do you want to allow this ?
if this is enexpected, it may be virus and you should choose no.

Is there any way to avoid this?

Potboy answered 27/6, 2009 at 11:5 Comment(2)
this is desirable behaviour. The user should be warned of that kind of use of their personal data.Reconnoitre
Does this answer your question? How to avoid Outlook security alert when reading outlook message from C# programFourierism
G
5

This is "by design". It's done to prevent viruses from doing things like going through the address book and automatically sending emails on the user's behalf. Having the dialog prevents a virus from silently becoming a spam bot.

Grim answered 27/6, 2009 at 11:52 Comment(0)
W
5

I know this isn't answering your direct question, but is there a reason you can use the System.Net.Mail.MailMessage class and send using that? Or is this because you want the e-mail to show up in their sent items?

Whimwham answered 27/6, 2009 at 12:36 Comment(2)
This is the same approach I had to take to prevent needing user interaction from an automated email signaling when certain processes failed etc.Succubus
From the comment above, if a copy is required in an inbox, the current user can be added to the recipient list.Permanency
Q
4

You need some library like Redemption to circumvent this popup. It's the default built-in security behaviour of Outlook (since version 2002 I think).

Quinquereme answered 27/6, 2009 at 11:11 Comment(1)
I keep seeing this reply, but I'm unsure if it's legit or not. I am cautious about infecting local machine. I assume it's legit if it continues to be posted on SE.Informality

© 2022 - 2024 — McMap. All rights reserved.