| 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? |
|
|
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? |
|
|
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? |
|
|
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 |
|
 |
|
|
|
|