View Single Post
  #5  
Old April 1st 09, 09:41 PM posted to microsoft.public.outlook.program_addins
Mark B[_2_]
external usenet poster
 
Posts: 93
Default x-header insertion issue

So when a user hits the reply button is the MAPI property of the original
email carried over into the new email so that when the user finally hits the
Send button on the new email we can interpret which email they are replying
to?

We only need to ascertain all this within the Outlook client itself on the
desktop -- we don't need it to be included after it leaves via the Send
event.

In summary -- an email comes in, we want to add a property with a specific
identifier and that gets stored within the email. Then later when the user
replies to that stored email, the new email has a new property to store the
original email's property value. Then when they eventually click Send we
perform our action if certain criteria based on the property are met.



"Ken Slovak - [MVP - Outlook]" wrote in message
...
The HTML idea would only work under controlled conditions. For example, if
someone were to have the setting for read all emails in plain text enabled
that would be one failure point.

I don't really see the problem, unless I'm missing something.

If you add the named MAPI property that becomes an x-header when the email
is sent over the Internet you can check for that. If the email stays
within an Exchange organization and there is no
PR_TRANSPORT_MESSAGE_HEADER property on the item just look for the named
MAPI property. One or the other should be there, so just fork your logic
based on checking for both.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
Thanks Ken.

Kyle and I want to store a bit of information in the original email so
that when someone replies to it we can programmatically read the
information from the original email now stored in the reply email and
take a certain action.

We had thought that X-Headers be able to be used to carry over this
information but as you described below that isn't appropriate.

The next thought I had was to append a bit of text to the body of the
original email so that's carried over to the reply email's body but the
danger there is that the user may inadvertently delete it when composing
the reply.

The next thought was to follow the idea on Sue Mosher's posting thread at
http://www.outlookcode.com/threads.a...essageid=24242, in
particular:

"28-Sep-2007 06:31
Very cool indeed! Interesting idea using input type="hidden". Have you
seen any problem getting Outlook 2007 to include that tag in the reply,
given that it's one of the ignored elements per
http://msdn2.microsoft.com/en-us/library/aa338201.aspx ? "

But instead of input type="hidden" use an HTML property such as Class
to store the bit of information since we are using OL2007 and according
to the post input type="hidden" is ignored.

However the questions now remain:

a) What if the incoming email is simply a plain-text email? Can we add a
"Class" HTML attribute for our purposes only, even though it is not an
HTML or rich-text email?

b) What if the reply email being composed is set to plain text or
Rich-Text? Will there be any way of intercepting Outlook's conversion of
a normal HTML email or a) to plain text so we can get our little piece of
information?

Basically all of this is to try and make a fast way of identifying the
original email replied to. I know there has been some posts on using the
conversation index attribute and using advanced search to find the
original using that but I seem to recall that wasn't bullet-proof. I
think there were some situations (such as moving emails to different
folders?, Exchange scenarios?) where it wouldn't work. If I am wrong on
that please let me know.

TIA



Ads