outlook com addin mail header problem

T

tasleem

hi all, i m new to the progamming in outlook i m using vs6, for making a
addin in C++. i want to get Mail header and then make decision based on that,
how to get that i tried using outlook object such as mailitem but was not
successful getting mail heaer

Precedence: MIME-Version: Content-Type: Content-Transfer-Encoding: how to
get those values using outlook object, or i have to use another object etc.

thanks in advance
 
K

Ken Slovak - [MVP - Outlook]

If you are using Outlook 2007 you can use the PropertyAccessor object to get
at the Internet email headers. If you're using an earlier version that's not
exposed in the Outlook object model. For earlier versions you have to use a
different API such as CDO 1.21 or Extended MAPI or a 3rd party library such
as Redemption (www.dimastr.com/redemption).

The property tag to use to get the Internet headers is
PR_TRANSPORT_MESSAGE_HEADERS (0x007D001E). The property is a PT_STRING8
property.
 
T

tasleem

Thanks for ur answer. i will try to use Extended MAPI, but i m receiving mail
using outlook object model, will extended mapi or CDO work? bcos i think that
mail will be removed from server n move to inbox of outlook, or CDO ExMAPI
will read mail from inbox rather than server ?
 
K

Ken Slovak - [MVP - Outlook]

Both CDO 1.21 and Extended MAPI can access items in the Inbox.
 
T

tasleem

hi thanks for answer, i m much confused confused with simple question, what
is difference b/w simple n extended MAPI and what are dll's for those
respective MAPI names,i m using windows XP and outlook 2003,i have one dll
MAPI32.dll, is that Extended MAPI or simple MAPI dll ? if not how to install
the extended MAPI ?
 
T

tasleem

hi,i m using this code but code fails at query interface line "error message
is " unresolved external symbol"
error LNK2001: unresolved external symbol _IID_IMAPISession, the line of
code is
CComPtr<IUnknown> punk;
spMailItem->get_MAPIOBJECT(&punk);
punk->QueryInterface(IID_IMAPISession, (void**)&m_pSession);//error line
tell me what to use, or what dll to include, i m confused bcos of not
knowing what dll or lib to use, as i mentioned in previous question.
thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

It depends on whether or not Outlook is installed and set as the mail
provider. In general Extended MAPI will be there and used if that's the
case. Simple MAPI is used by Outlook Express among other applications and is
always used when a Send To, Mail Recipient command is used.

The other way to install Extended MAPI (the MS version) on a computer is to
install the Exchange admin tools, but that's server side MAPI and not client
side MAPI.
 

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