How to get the exact mail body of incoming mails(english or non-english)?

How to get the exact mail body of incoming mails(english or non-english)?

Post by DKDS.Naid » Tue, 12 Jul 2005 19:56:09



I am Naidu. I am developing ATL COM Addin for MS Outlook.I am trying t

get the exact body of incoming mails of Outlook.I can get the exac
body
of English mails. I can't get the exact body of Non-English mails.
I am giving rough code. Please correct me.

I want to know the charset of incoming mail. How?

STDMETHODIMP CMyClass::OnDelivery(IExchExtCallback *lpExchangeCallback

{
LPMESSAGE lpMessage= NULL;
LPMDB lpMdb = NULL;
ULONG ulPropCount = 0;
LPSPropValue lpMessageProps = NULL;
if (SUCCEEDED(lpExchangeCallback->GetObject(&lpMdb, (LPMAPIPROP*
&lpMessage)))
{
static SizedSPropTagArray(1,PropTagArray) ={1, {PR_BODY}};
if (SUCCEEDED(lpMessage->GetProps((LPSPropTagArray
&PropTagArray,0,&ulPropCount,&lpMessageProps)))
{
if (PROP_TYPE(lpMessageProps[0].ulPropTag) != PT_ERROR

{

MessageBox(NULL,lpMessageProps[0].Value.lpszA,"Ascii
Text",MB_OK);//I can get the English mail body

//How Can I get the CHINESE text.
//How can I know this mail i
chinese(non-english) mail or English mail.

}//End of PR_BODY

}//End of GetProps

}//End of GetObject

return S_FALSE;

}//End of OnDelivery


Thanks in advance.
Regards,

--
DKDS.Naidu