Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

winmail.dat and PR_SEND_RICH_INFO

70 views
Skip to first unread message

Sebastian Marek

unread,
May 19, 2003, 8:40:07 AM5/19/03
to
howdy!

i'm stuck. i send an email via extended MAPI on a winxp-system with outlook
2000. but it's the same on the other system (win2k, outlook 2003beta).

i've searched the web (and this newsgroup) and dmitry said, that you have to
set the recepients PR_SEND_RICH_INFO to FALSE (i.e. .Value.b=0) - but that
doesn't work here. i still get that winmail.dat-file delivered. :(

i create the recipient as a "One-Off" contact - and whatever i set
PR_SEND_RICH_INFO to (false or true or don't set it at all) and whatever i
give CreateOneOff in its ulFlags-parameter: i always get that winmail.dat! i
drives me crazy!

does anyone have an idea?

TIA!

here's the relevant code:
lpAdrBook->CreateOneOff("bla","SMTP","b...@bla.com",
MAPI_SEND_NO_RICH_INFO,&ulRecEIDSize,&lpRecEID);

LPMAILUSER lpReceiver;

lpAdrBook->OpenEntry(ulRecEIDSize,lpRecEID,NULL,MAPI_BEST_ACCESS,&ulObjType,
(LPUNKNOWN*)&lpReceiver);

LPSPropValue lpRecProps;

ulCount = grCount;

hRes =
lpReceiver->GetProps((LPSPropTagArray)&ptaGetRecipProps,0,&ulCount,&lpRecPro
ps);

LPADRLIST lpAdrListRec = NULL;

hRes = MAPIAllocateBuffer(sizeof(ADRLIST),(LPVOID *)&lpAdrListRec);

lpAdrListRec->cEntries = 1;

hRes = MAPIAllocateBuffer(5*sizeof(SPropValue),(LPVOID
*)&(lpAdrListRec->aEntries[0].rgPropVals));

lpAdrListRec->aEntries[0].cValues = 5;

lpAdrListRec->aEntries[0].rgPropVals[0].ulPropTag = PR_DISPLAY_NAME;

lpAdrListRec->aEntries[0].rgPropVals[0].Value.lpszA =
lpRecProps[grPR_EMAIL_ADDRESS].Value.lpszA;

lpAdrListRec->aEntries[0].rgPropVals[1].ulPropTag = PR_RECIPIENT_TYPE;

lpAdrListRec->aEntries[0].rgPropVals[1].Value.l = MAPI_TO;

lpAdrListRec->aEntries[0].rgPropVals[2].ulPropTag = PR_ADDRTYPE;

lpAdrListRec->aEntries[0].rgPropVals[2].Value.lpszA = "SMTP";

lpAdrListRec->aEntries[0].rgPropVals[3].ulPropTag = PR_ENTRYID;

lpAdrListRec->aEntries[0].rgPropVals[3].Value.bin =
lpRecProps[grPR_ENTRYID].Value.bin;

lpAdrListRec->aEntries[0].rgPropVals[4].ulPropTag = PR_SEND_RICH_INFO;

lpAdrListRec->aEntries[0].rgPropVals[4].Value.b = 0;

hRes = lpMessage->ModifyRecipients(0,lpAdrListRec);


Sebastian Marek

unread,
May 19, 2003, 8:47:03 AM5/19/03
to
oh, i forgot to mention: it's just outlook on a pop3-account. no
exchange-server or similar in between.

"Sebastian Marek" <s.m...@web.de> schrieb im Newsbeitrag
news:ud8fMPgH...@TK2MSFTNGP12.phx.gbl...

Dmitry Streblechenko

unread,
May 19, 2003, 4:54:08 PM5/19/03
to
There is no clear recipe on how to send plain text/HTML/RTF messages in
various versions of Outlook, but the only rule of thumb is to compare your
message with a mesasge sent by Outlook in the appropriate format. Look at
two properties on the message itself: PR_MSG_EDITOR_FORMAT and
PrInetOverrideMailFormat (might not be applicable to the IMAIL provider).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Sebastian Marek" <s.m...@web.de> wrote in message
news:#1#IETgHD...@tk2msftngp13.phx.gbl...

Sebastian Marek

unread,
May 20, 2003, 4:27:33 AM5/20/03
to
i partly solved it!

the two tags you suggested didn't change anything, but it took me on the
right track. i compared two mails (one sent via outlook directly and the
other via extended MAPI) property by property, and it turned out, that
PR_MESSAGE_CLASS of my xMAPI-created mail was just "IPM" and the other one
was "IPM.Note".

so i manually changed that property for my xMAPI-mail in C++ to "IPM.Note"
and winmail.dat is gone when using outlook 2000. on the other hand, outlook
2003beta still keeps sending it - so there's more work to do for me...there
are even more differences in the properties of the two messages...so
hopefully outlook 2003 will soon stop sending that too...

thx dmitry!

"Dmitry Streblechenko" <dmi...@dimastr.com> schrieb im Newsbeitrag
news:eQB9YikH...@TK2MSFTNGP10.phx.gbl...

Sebastian Marek

unread,
May 20, 2003, 4:37:45 AM5/20/03
to
argl! forgot to rebuild the release-version. ;)

changing PR_MESSAGE_CLASS to "IPM.Note" does solve it for outlook 2003 too.
so finally, i'm happy :)

"Sebastian Marek" <s.m...@web.de> schrieb im Newsbeitrag

news:u5HetmqH...@TK2MSFTNGP11.phx.gbl...

Sebastian Marek

unread,
May 20, 2003, 4:37:45 AM5/20/03
to
argl! forgot to rebuild the release-version. ;)

changing PR_MESSAGE_CLASS to "IPM.Note" does solve it for outlook 2003 too.
so finally, i'm happy :)

"Sebastian Marek" <s.m...@web.de> schrieb im Newsbeitrag
news:u5HetmqH...@TK2MSFTNGP11.phx.gbl...

0 new messages