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

后端 未结 3 826
攒了一身酷
攒了一身酷 2020-12-19 09:15

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

相关标签:
3条回答
  • 2020-12-19 09:39

    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.

    0 讨论(0)
  • 2020-12-19 09:40

    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?

    0 讨论(0)
  • 2020-12-19 09:52

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

    0 讨论(0)
提交回复
热议问题