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 object (which represents an
email)
to my hard drive or a network 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 (converted from VB.NET)
-----------------------------------------
{
MAPI.Session oSession = new MAPI.Session();
MAPI.Folder oFolder;
MAPI.Messages oMessages;
MAPI.Message oMessage;
string strEmailAccount = "Exchange_Email _Account";
string strExchangeServ erName = "exchange04 ";
object profile = null;
string strProfile = strExchangeServ erName + Constants.vbLf +
strEmailAccount ;
oSession.Logon( "", , , false, , true, strProfile);
// Get Inbox.
oFolder = oSession.Inbox;
// Get Messages collection.
oMessages = oFolder.Message s;
// Get the second email
oMessage = oMessages.Item( 2);
}
-------------------------------------------
Your help will be greatly appreciated
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 object (which represents an
email)
to my hard drive or a network 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 (converted from VB.NET)
-----------------------------------------
{
MAPI.Session oSession = new MAPI.Session();
MAPI.Folder oFolder;
MAPI.Messages oMessages;
MAPI.Message oMessage;
string strEmailAccount = "Exchange_Email _Account";
string strExchangeServ erName = "exchange04 ";
object profile = null;
string strProfile = strExchangeServ erName + Constants.vbLf +
strEmailAccount ;
oSession.Logon( "", , , false, , true, strProfile);
// Get Inbox.
oFolder = oSession.Inbox;
// Get Messages collection.
oMessages = oFolder.Message s;
// Get the second email
oMessage = oMessages.Item( 2);
}
-------------------------------------------
Your help will be greatly appreciated
Comment