From: Denis on
Hi all,



I'm having a problem trying to add response text to the body of an email on
WM6 devices. My code works fine on 2005 devices so I'm assuming it's a
specific difference with PR_BODY on WM6 devices.



I have a method which sets the body of an email. When replying to a mail,
my code first saves the reply to the drafts folder then opens the reply in
drafts and adds some body text. The problem I am seeing is that instead of
inserting the response text before the "-----Original Message-----" line, the
response text is actually overwriting this line, so when the mail is sent,
the response text is not in the received mail.



My code....

<Code>

int CEmailPlugin:: SetBody(EmailId emailId, wchar_t *pBody)

{

int nErrorCode = EP_ERROR_EMAIL_NOT_FOUND;

IMessage* pMessage = NULL;

do

{

nErrorCode = GetMessage(emailId, &pMessage);

if(nErrorCode != EP_ERROR_SUCCESS)

{

break;

}

CIMessageUtil msgUtil(pMessage);

msgUtil.PutStringPropertyIntoStream(PR_BODY, pBody, 0);

nErrorCode = EP_ERROR_SUCCESS;

}while(0);

</Code>



Has anyone else come across this problem or have any suggestions how to sort
it out?



Thanks in advance,

Denis