Click here to get back home

E-mail signature programmatically

 HomeNewsGroups | Search | About
 microsoft.public.smartphone    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
E-mail signature programmatically Magi 03-27-2008
Posted by Magi on March 27, 2008, 12:48 pm
Please log in for more thread options
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

Posted by Peter Foot on March 27, 2008, 1:21 pm
Please log in for more thread options
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

> 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


Posted by Magi on March 27, 2008, 1:39 pm
Please log in for more thread options
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
>

Posted by Magi on March 27, 2008, 2:08 pm
Please log in for more thread options
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] = ;

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

Similar ThreadsPosted
Email Signature programmatically: part 2 April 3, 2008, 9:07 am
Treo 700w email signature does not appear when replying to email March 7, 2006, 1:40 pm
No Digital Signature October 29, 2005, 3:05 pm
Outlook signature July 17, 2007, 3:59 pm
how to adjust volume level programmatically? August 10, 2006, 10:49 pm
How to programmatically set the phone ringing mode? April 24, 2007, 12:07 pm
How to programmatically react on incoming phone calls? April 18, 2007, 11:28 am
Signature on Poutlook direct push account October 5, 2006, 9:18 am
How to start Emulator (programmatically) to automatically connect to desktop? November 2, 2005, 9:36 pm
Windows Mobile 2005 does not sync email unless client processes email first July 5, 2006, 12:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap