Solved

MAPI or whatever ...

Posted on 2013-02-04
4
355 Views
Last Modified: 2013-02-05
Hi girls and boys!

We are in the process of migrating a product from an old platform (Clarion, VB6, CDO, etc) to a more up to date one. One thing I'm not sure about is how to handle the sending of e-mails.

In our old product we used MAPI:

MAPILogon Lib "MAPI32.DLL", MAPISendMail Lib "MAPI32.DLL" and so on.

The way it worked was that we used the MAPI32 DLL to:
1) Log on
2) Create the bones of an e-mail message
3) Present the e-mail to the user using their native e-mail program, and they can then put in recipients etc and hit the "send" button themselves.

The latter is the crux here; we do not simply produce the e-mail and send it automatically, the user needs to be presented with an e-mail dialog from which they proceed. We want to avoid having to write our own dialog if at all possible.

MAPI seems to have gone "out of fashion" in the .NET world, but I can't seem to find a good example of a Native .NET way of doing the same thing.

Pointers to clear and unambiguous examples much appreciated, preferably in VB.NET

Ta muchly!

P
0
Comment
Question by:WernerVonBraun
4 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 167 total points
ID: 38851874
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 166 total points
ID: 38852112
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 167 total points
ID: 38854461
0
 
LVL 4

Author Comment

by:WernerVonBraun
ID: 38854557
Hello all,

We used MAPI32 in the old VB6 component because it gave us the functionality we needed:

1) It had to display the New Mail form to the user, so the user could make final modifications to the mail before sending it. For that reason EaswaranP's solution can't work.
2) We had to add attachments programmatically. For that reason, kaufmed's solution can't work.
3) It had to bring up the "new mail" form of whatever the user's Mail software is. This *could* be Outlook, but it could be any other of the commonly used applications. For that reason, we can't use CodeCruiser's software.

I did, however, find the solution in the end. It can be found here:
http://www.codeproject.com/Articles/17561/Programmatically-adding-attachments-to-emails-in-C

Cheers


Pino


While none of your ideas were exactly what we were looking for, I appreciate your input and I'm going to distribute the points accordingly.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

763 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