Link to home
Start Free TrialLog in
Avatar of Member_2_1348041
Member_2_1348041Flag for Ireland

asked on

MAPI or whatever ...

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
ASKER CERTIFIED SOLUTION
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_1348041

ASKER

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.