To create the attachment, I create the complete data as wide char
buffer and then convert it into ansi to write to stream
LPWSTR pszCustomMsg; // attachment data which will contain accented
chars
…..
…..
hr = pAttach->OpenProperty(PR_ATTACH_DATA_BIN, &IID_IStream, 0,
MAPI_CREATE | MAPI_MODIFY, (LPUNKNOWN*)pStream.getptr());
LPSTR pszTempString = UnicodeToAnsii(pszCustomMsg); // function to
convert to ansii
ULONG nBytesToWrite = (ULONG)strlen(pszTempString);
ULONG nWritten = 0;
LPBYTE pData = (LPBYTE)pszTempString;
while(nBytesToWrite > 0)
{
pStream->Write( pData, nBytesToWrite, &nWritten );
nBytesToWrite -= nWritten;
pData += nWritten;
}
pStream->Commit(STGC_DEFAULT);
Any help is highly appreciated.
Thanks,
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Amit" <ver_a...@yahoo.com> wrote in message
news:6c1b52e6-ab9b-45b1...@v7g2000pro.googlegroups.com...
On Dec 16, 8:02 pm, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> Firsly, it it really necessary to have MIME type with teh characters form
> teh upper half of the ASCII table?
> Secondly, would this not indicate that this is really a problem with the
> receiving mail client? What is it?
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -"Amit" <ver_amit...@yahoo.com> wrote in message
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Amit" <ver_a...@yahoo.com> wrote in message
news:3d2c1553-2a0d-4eeb...@y10g2000prg.googlegroups.com...