How to use MAPI to change the charset of an email?
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
How to use MAPI to change the charset of an email?

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Jeffrey
Guest





Posted: Fri Oct 21, 2005 4:58 pm    Post subject: How to use MAPI to change the charset of an email? Reply with quote

Greetings,

I am trying to use MAPI to send emails under Japanese OS.

However, the mail is always being sent using charset= iso-8859-1,
instead of " iso-2022-jp", I wonder when / where / how do I change
the charset before sending the email?

Thanks,
Jeffrey

Back to top
Jeffrey
Guest





Posted: Fri Oct 21, 2005 11:36 pm    Post subject: Re: How to use MAPI to change the charset of an email? Reply with quote

This seems to work:

#ifndef PR_INTERNET_CPID

#define PR_INTERNET_CPID 0x3FDE0003

#endif

SPropValue* propValue = NULL;

::MAPIAllocateBuffer(sizeof(SPropValue), (LPVOID FAR*)&propValue);

if (NULL != propValue)

{

propValue->Value.ul = 932; // Japanese code page

propValue->ulPropTag = PR_INTERNET_CPID;

::HrSetOneProp(sMessage, propValue);

::MAPIFreeBuffer(propValue);

}



"Jeffrey" <mengjinjie@gmail.com> wrote in message
news:u6ErVrl1FHA.3780@TK2MSFTNGP12.phx.gbl...
Quote:
Greetings,

I am trying to use MAPI to send emails under Japanese OS.

However, the mail is always being sent using charset= iso-8859-1,
instead of " iso-2022-jp", I wonder when / where / how do I change
the charset before sending the email?

Thanks,
Jeffrey
Back to top
Dmitry Streblechenko
Guest





Posted: Mon Oct 24, 2005 12:58 am    Post subject: Re: How to use MAPI to change the charset of an email? Reply with quote

Don't forget to save the changes
(sMessage->SaveChanges(KEEP_OPEN_READWRITE))

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

"Jeffrey" <mengjinjie@gmail.com> wrote in message
news:elGd15m1FHA.3924@TK2MSFTNGP14.phx.gbl...
Quote:
This seems to work:

#ifndef PR_INTERNET_CPID

#define PR_INTERNET_CPID 0x3FDE0003

#endif

SPropValue* propValue = NULL;

::MAPIAllocateBuffer(sizeof(SPropValue), (LPVOID FAR*)&propValue);

if (NULL != propValue)

{

propValue->Value.ul = 932; // Japanese code page

propValue->ulPropTag = PR_INTERNET_CPID;

::HrSetOneProp(sMessage, propValue);

::MAPIFreeBuffer(propValue);

}



"Jeffrey" <mengjinjie@gmail.com> wrote in message
news:u6ErVrl1FHA.3780@TK2MSFTNGP12.phx.gbl...
Greetings,

I am trying to use MAPI to send emails under Japanese OS.

However, the mail is always being sent using charset= iso-8859-1,
instead of " iso-2022-jp", I wonder when / where / how do I change
the charset before sending the email?

Thanks,
Jeffrey




Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB