|
Prev: WM6 Newbie - Need Explanations on the Network management
Next: iPAQ 210/iPAQ 211 after 1 week of use
From: Magi on 27 Mar 2008 12:48 Hi all, I have a question about the signature of the email. I would like to modify programmatically the text of the signature and assing it to a defined email account. Basically I would like to do programmatically as the user performs by itself in the forms Options->Signature "Select an account" and the checkbox "use signature with this account". Then I would like to be able to add/modify the text... Thanks in advance to all Marco
From: Peter Foot on 27 Mar 2008 13:21 The signature is stored as a property on the message store which represents the specific account. The property id is defined in cemapi.h:- // Account signature #define PR_CE_SIGNATURE PROP_TAG (PT_UNICODE, 0x8119) Peter -- Peter Foot Microsoft Device Application Development MVP www.peterfoot.net | www.inthehand.com In The Hand Ltd - .NET Solutions for Mobility "Magi" <magi(a)funambol.com> wrote in message news:u80h1pCkIHA.4664(a)TK2MSFTNGP03.phx.gbl... > Hi all, > I have a question about the signature of the email. I would like to > modify programmatically the text of the signature and assing it to a > defined email account. Basically I would like to do programmatically as > the user performs by itself in the forms > Options->Signature "Select an account" and the checkbox "use signature > with this account". Then I would like to be able to add/modify the text... > > Thanks in advance to all > Marco
From: Magi on 27 Mar 2008 13:39 Hi Peter, thank you very much for the quick response! I had a look at the cemapi header file. So is it right to do the following (just the logic steps...)? // open the messageStore that is my account pmsg = pSession->OpenMsgStore(...) pmsg->SetProps(PR_CE_SIGNATURE, PR_CE_USE_SIGNATURE) this would be to write the text in the box of the UI provided by the email client and select the checkbox? Thanks again Marco Peter Foot ha scritto: > The signature is stored as a property on the message store which > represents the specific account. The property id is defined in cemapi.h:- > // Account signature > #define PR_CE_SIGNATURE PROP_TAG (PT_UNICODE, 0x8119) > > Peter >
From: Magi on 27 Mar 2008 14:08
Hi Peter, thanks a lot, it works! Here is a grab of the program // Open this message store hr = pSession->OpenMsgStore (NULL, psrs->aRow[0].lpProps[0].Value.bin.cb, (ENTRYID *) psrs->aRow[0].lpProps[0].Value. bin.lpb, NULL, 0, &pStore); EXIT_ON_FAILED (hr); SPropValue rgprops[2] = {0}; rgprops[0].ulPropTag = PR_CE_SIGNATURE; rgprops[0].Value.lpszW = TEXT("This is the test signature"); rgprops[1].ulPropTag = PR_CE_USE_SIGNATURE; rgprops[1].Value.b = true; hr = pStore->SetProps(2, rgprops, NULL); Cheers Marco Magi ha scritto: > Hi Peter, > thank you very much for the quick response! > I had a look at the cemapi header file. > So is it right to do the following (just the logic steps...)? > > // open the messageStore that is my account > pmsg = pSession->OpenMsgStore(...) > pmsg->SetProps(PR_CE_SIGNATURE, PR_CE_USE_SIGNATURE) > > this would be to write the text in the box of the UI provided by the > email client and select the checkbox? > > Thanks again > Marco > > > Peter Foot ha scritto: >> The signature is stored as a property on the message store which >> represents the specific account. The property id is defined in cemapi.h:- >> // Account signature >> #define PR_CE_SIGNATURE PROP_TAG (PT_UNICODE, 0x8119) >> >> Peter >> |