| |||||||
| Smartphones This is the Microsoft General Public Smartphones Newsgroup. |
![]() |
| | LinkBack | Thread Tools |
| |||
| E-mail signature programmatically 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 |
| |||
| Re: E-mail signature programmatically 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@funambol.com> wrote in message news:u80h1pCkIHA.4664@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 |
| |||
| Re: E-mail signature programmatically 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 > |
| |||
| Re: E-mail signature programmatically 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 >> |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing registry permission programmatically | Trups | Windows Vista | 3 | 02-18-2008 08:30 AM |
| Detect 3GB switch programmatically | scorpneo@gmail.com | Windows XP | 1 | 05-23-2007 08:30 AM |
| Detect 3GB switch programmatically | scorpneo@gmail.com | Windows Vista | 0 | 05-23-2007 07:40 AM |
| How to Export IE Favorites Programmatically | Scott | Internet Explorer | 1 | 05-06-2007 09:56 AM |
| How to Save a webpage to MHT programmatically? | Ajay | Internet Explorer | 0 | 05-06-2007 08:00 AM |