Technology Questions

Go Back   Technology Questions > Hardware Questions > Electronics > Smartphones

Smartphones This is the Microsoft General Public Smartphones Newsgroup.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 03-27-2008, 08:50 AM
Magi
Newsgroup Contributor
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 03-27-2008, 08:50 AM
  #2 (permalink)  
Old 03-27-2008, 09:30 AM
Peter Foot
Newsgroup Contributor
 
Posts: n/a
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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 03-27-2008, 09:40 AM
Magi
Newsgroup Contributor
 
Posts: n/a
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
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 03-27-2008, 10:10 AM
Magi
Newsgroup Contributor
 
Posts: n/a
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
>>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 09:30 AM
Detect 3GB switch programmatically scorpneo@gmail.com Windows Vista 0 05-23-2007 08:40 AM
How to Export IE Favorites Programmatically Scott Internet Explorer 1 05-06-2007 10:56 AM
How to Save a webpage to MHT programmatically? Ajay Internet Explorer 0 05-06-2007 09:00 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 08:23 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0