MikeD
11/17/2010 9:53:00 PM
"fniles" <fiefie.niles@gmail.com> wrote in message
news:c4807ce2-bb92-46e4-b75a-dac4821e3ae2@w18g2000vbe.googlegroups.com...
> Our VB program sends an email using MAPI.
> If the program runs from a machine with Outlook 2000, the email was
> sent without any prompt.
> But, if the program runs from a machine with Outlook version later
> than 2000 (like my machine has Outlook 2007), before the email is
> sent, it prompt a message that say "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. For more information
> about e-mail safety and how you might be able to avoid getting this
> warning, click Help." with buttons "Allo", "Deny" "Help".
>
> I tested by going to my Outlook - Tools - Trust Center - Programmatic
> Access and check "Never warn me about suspicious activity (not
> recommended) ", but still get the prompt.
> Is there anything I can do from my program that will not make the
> prompt to show up ?
That was a "feature" added to Outlook beginning, I think, with Outlook 2002.
That is one of the reasons why I personally don't use Outlook for sending
emails. These emails are sent from a Windows Service app that runs 24/7
importing items (sales orders, purchase orders, GL transaction items, etc.)
into ERP software. If errors occur during any of these, an email with an an
error log attached to it is sent to specific persons. That prompt from
Outlook was a major problem. I chose to use CDO, which utilizes an SMTP
server and bypasses MAPI completely. The only complaint some companies have
had is that there's no email in a Sent mailbox. But, that's kind of
ridiculous complaint because they can have the email sent to anyone in their
company they choose. So the email is just in their in box rather than their
sent box. Plus, the error log files are never deleted unless they do so
manually themselves, so they can just open the file if they ever need to.
The only other downside, if you can call it that, is that someone needs to
know and provide the SMTP server name and possibly logon credentials (I've
found that with most companies, if emails are sent only to others within the
company, credentials usually aren't necessary). Those get saved, encrypted,
so they only need entered once during configuration.
CDO is really pretty simple to use. And as I mentioned, you can attach files
to your emails. You can even use HTML to create the email body. There is no
dependency on Outlook or any other MAPI provider, which IMO is another big
plus.
As mentioned, if you really want to continue using Outlook for whatever
reason, Redemption is one solution. But that's yet another ActiveX component
you must distribute and install, adds additional overhead, and STILL has a
dependency on Outlook being installed. There's none of that with CDO as it's
part of Windows.
--
Mike