Solved

How to send emails programmatically using MAPI calls without user confirmation

Posted on 2008-06-17
5
974 Views
Last Modified: 2013-12-26
Hi everybody,
I'm working on a software which needs to send emails. I plan to use MAPI calls to do this (precisely, I want to use the PowerBuilder mailSession object which is based on MAPI).
This however requires the user to confirm that the program is allowed to send the email, each time that a MAPI call is done.

Is it possible to disable this? I found some software to do that (ClickYes and Outlook Security Manager) but I would prefer a solution which does not require buying an extra software.

I didn't found much information by myself and I don't know much about MAPI yet.

Some information about the "context":
1) The software will be running as a service, in the background -- so without any user. This is why I really need to shut off these security settings.
2) The email client is Outlook, the server is Exchange. Other email protocol could be used in the future, but this is no strong requirement at the time
3) The users have strong security requirements. It would then be much better if the security warnings could be disabled for this software only but still appear in case another software tries to send an email.

Thanks a lot!
Best Regards,
Fabien Pollet
0
Comment
Question by:polletfa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 10

Assisted Solution

by:Kieran_Burns
Kieran_Burns earned 200 total points
ID: 21803317
I like the idea of KISS (keep it simple...) so I have used Blat in the past: http://www.blat.net/ A very simple tool and easy to configure.

Does this fit your requirements?
0
 

Author Comment

by:polletfa
ID: 21803522
Not really since the program will work within an Exchange environment and I'm not sure if a SMTP connector is configured, or if the network administrator will agree to add one.
I would prefer to stay on MAPI because the software will eventually be deployed within several different companies and it will be better if the customers may use whatever email protocol they want.

I keep that in mind anyway as a backup solution.
Thanks.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 300 total points
ID: 21803578
Hi, Fabien.

Assuming that you are using Outlook 2003 or earlier, then those security warnings cannot be disabled.  ClickYes and Outlook Redemption (http://www.dimastr.com) are the only safe workarounds I know of.  In addition to Kieran_Burns suggestion of Blat, you might consider VBSendMail a free COM component that allows you to send via SMTP and bypass Outlook, and its security, altogether.  Here's a link to it: http://www.freevbcode.com/ShowCode.Asp?ID=109
0
 

Author Comment

by:polletfa
ID: 21819443
Ok, thanks to you both.
I don't quite understand why Microsoft didn't provide a way to configure those settings. I guess I'll have to work with that anyway.
0
 

Author Comment

by:polletfa
ID: 21823777
In case someone is intereste, here's a workaround:
http://www.everythingaccess.com/tutorials.asp?ID=Outlook-Send-E-mail-Without-Security-Warning
It's not very simple but it works (with Outlook 2003 and later only)

1) Create an Outlook macro to send a mail
2) Change the security level for macros (or somehow configure Outlook so that it trusts the macro)
3) Call the macro using OLE automation (the link gives an example with Access VBA, but I tried it with PowerBuilder)
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question