Save MAPI.Message as File

N

Nabil

Hi,

This is the first time I've posted something on here.


I've looked around the web for hours and failed miserably. Hopefully
someone out there would be able to help.


I'm trying to save an MApi.Message (which represents an email) object
to my hard or a network drive drive as an MSG file but I'm getting
nowhere. I know I
can use Redemption to do this but I'm trying to avoid 3rd party
products (especially ones I have to pay for)

Here's my code

------------------------------------

MAPI.Session oSession = new MAPI.Session();
MAPI.Folder oFolder;
MAPI.Messages oMessages;
MAPI.Message oMessage;
string strEmailAccount = "Exchange_Email_Account";
string strExchangeServerName = "exchange04";


object profile = null;
string strProfile = strExchangeServerName + Constants.vbLf +
strEmailAccount;


oSession.Logon("", , , false, , true, strProfile);


oFolder = oSession.Inbox;


oMessages = oFolder.Messages;


oMessage = oMessages.Item(2);
 
N

Nabil

Thanks a lot for taking the time to reply.

There's no Save() method in Mapi.Message but I will double check the
MAPI namespace. I'll also look for a group that specifically
addresses MAPI.

Cheers

Nabil
 
T

thd

Thanks a lot for taking the time to reply.

There's no Save() method in Mapi.Message but I will double check the
MAPI namespace. I'll also look for a group that specifically addresses
MAPI.

Cheers

Nabil

I recommend microsoft.public.win32.programmer.messaging

Tom Delany
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top