none
EWS Managed - adding processing notes to an email item RRS feed

  • Question

  • Hi there,

    I'm using EWS Managed API 1.1 to parse data from a emails received to a mailbox.

    As part of the process I'd like to associate notes to the email, describing any processing errors so that the user accessing the mailbox via Outlook can easily read the information. I'm trying to avoid forwarding the email with additional notes in the body as that would generate duplicates of the email and confuse the user.

    What's the best way to accomplish this?

    Some things I've considered (but not sure if they're doable)

    1. Add content to the original email body and re-save it?.
    2. Add a note or text document attachment to the original email and re-save.
    3. Use custom properties (not sure if these can be viewed within Outlook).
    4. Is it possible to attach the original email to a new message without duplicating it?

    I'd prefer not to modify the original email if possible since the mailbox user will need to remove that information from the email if they're replying to the sender. But if thats the only way, I'll do it.

    Thanks!

     

    Friday, July 15, 2011 9:22 PM

Answers

  • Hi,

    in principle, most of your approaches will work.

    You can add text to the body of the mail. The EmailMessage.Body would be the property for this. You could put your text in a region like this:

    === Processing notes START

    .....

    === Processing notes END

    ... Rest of the mail is here.

    You can add a new attachment to an existing mail using the Attachments collection.

    Custom properties are accessible from Outlook as long as you store them in the PublicStrings namespace. But you need to create a custom message class and register a form for this.

    I'm not sure what you mean with your fourth approach - attaching the mail without duplicating it. Can you elaborate?

    Kind regards,
    Henning

    "Giablo" wrote in message news:b6402cc5-6bc7-4d0b-943c-5502b61be87b@communitybridge.codeplex.com...

    Hi there,

    I'm using EWS Managed API 1.1 to parse data from a emails received to a mailbox.

    As part of the process I'd like to associate notes to the email, describing any processing errors so that the user accessing the mailbox via Outlook can easily read the information. I'm trying to avoid forwarding the email with additional notes in the body as that would generate duplicates of the email and confuse the user.

    What's the best way to accomplish this?

    Some things I've considered (but not sure if they're doable)

    1. Add content to the original email body and re-save it?.
    2. Add a note or text document attachment to the original email and re-save.
    3. Use custom properties (not sure if these can be viewed within Outlook).
    4. Is it possible to attach the original email to a new message without duplicating it?

    I'd prefer not to modify the original email if possible since the mailbox user will need to remove that information from the email if they're replying to the sender. But if thats the only way, I'll do it.

    Thanks!

    Friday, July 15, 2011 10:16 PM

All replies

  • Hi,

    in principle, most of your approaches will work.

    You can add text to the body of the mail. The EmailMessage.Body would be the property for this. You could put your text in a region like this:

    === Processing notes START

    .....

    === Processing notes END

    ... Rest of the mail is here.

    You can add a new attachment to an existing mail using the Attachments collection.

    Custom properties are accessible from Outlook as long as you store them in the PublicStrings namespace. But you need to create a custom message class and register a form for this.

    I'm not sure what you mean with your fourth approach - attaching the mail without duplicating it. Can you elaborate?

    Kind regards,
    Henning

    "Giablo" wrote in message news:b6402cc5-6bc7-4d0b-943c-5502b61be87b@communitybridge.codeplex.com...

    Hi there,

    I'm using EWS Managed API 1.1 to parse data from a emails received to a mailbox.

    As part of the process I'd like to associate notes to the email, describing any processing errors so that the user accessing the mailbox via Outlook can easily read the information. I'm trying to avoid forwarding the email with additional notes in the body as that would generate duplicates of the email and confuse the user.

    What's the best way to accomplish this?

    Some things I've considered (but not sure if they're doable)

    1. Add content to the original email body and re-save it?.
    2. Add a note or text document attachment to the original email and re-save.
    3. Use custom properties (not sure if these can be viewed within Outlook).
    4. Is it possible to attach the original email to a new message without duplicating it?

    I'd prefer not to modify the original email if possible since the mailbox user will need to remove that information from the email if they're replying to the sender. But if thats the only way, I'll do it.

    Thanks!

    Friday, July 15, 2011 10:16 PM
  • Thanks Henning!

    For approach #4 - I was thinking create a new email containing processing messages in the body, and attach the original email to it as an attachment. I'm not sure if that would create a duplicate version of the original email or just attach a 'reference'. I'd like to avoid duplicating originals so that its clear which ones have been processed etc.

    You mentioned - "Custom properties are accessible from Outlook as long as you store them in the PublicStrings namespace. But you need to create a custom message class and register a form for this."

    Is this a something that would need to be setup in Outlook on each desktop?

    Edit: Would it be possible / safe to edit some of the existing fields supported by Outlook? E.g. I see a 'Comments' field in the field list for messages.

     

    G


    Monday, July 18, 2011 2:57 PM
  • Hi,

    adding an item as attachment to a new item would duplicate the item. EWS does not allow you to add a link to an existing item.

    Regarding the custom properties:
    You can register a form for the entire organization. See http://support.microsoft.com/kb/290802 for more.

    Regarding the existing fields:
    Microsoft has documented the properties they use for mail messages.
    http://msdn.microsoft.com/en-us/library/cc433490(v=exchg.80).aspx contains a list of all MAPI properties.
    http://msdn.microsoft.com/en-us/library/cc463900(v=EXCHG.80).aspx contains a descriptions of the fields used for Email messages.

    If a property is not exposed as a direct property in the EWS Managed API object model you can use extended properties to access them.

    Kind regards,
    Henning
     "Giablo" wrote in message news:906b7c85-e2ef-463f-b333-13a8a45071be@communitybridge.codeplex.com...

    Thanks Henning!

    For approach #4 - I was thinking create a new email containing processing messages in the body, and attach the original email to it as an attachment. I'm not sure if that would create a duplicate version of the original email or just attach a 'reference'. I'd like to avoid duplicating originals so that its clear which ones have been processed etc.

    You mentioned - "Custom properties are accessible from Outlook as long as you store them in the PublicStrings namespace. But you need to create a custom message class and register a form for this."

    Is this a something that would need to be setup in Outlook on each desktop?

    Edit: Would it be possible / safe to edit some of the existing fields supported by Outlook? E.g. I see a 'Comments' field in the field list for messages.

    Monday, July 18, 2011 6:23 PM
  • Hi Henning, just wanted to say thanks for your input on this. I went with a simple text file attachment and the app is working great and a resounding success! Thanks again!
    Monday, August 22, 2011 11:27 PM