none
Ews Api Outbox Notification

    Question

  • Hello,

    I'm using streaming notification, and everythings fine, except for the OUTBOX folder.

    I need to intercept all outgoing email sent from a mailbox (shared with some clients like Outlook,Owa or mobile) because I need to modify the subject (append a personal code to it, or a signature to the body) but before the email is sent to the final recipient.

    And I need to do this by server side, not client side (eg outlook or owa)

    I intercept correctly the event but when I try to bind to the outgoing email, I have an error that say me "object not found".

    I think that is correct, because Exchange server raises the event to me (maybe in async mode i think) but at the same time move the outgoing email from OUTBOX to SENTITEMS folder.

    Obviously if I modify the subject in SENTITEMS folder, the subject is changed for Exchange user, but not for the final receipient, that receive an email with old subject.

    Some idea or workaround to do this operation??

    Thanks in advance

    Matteo

    Friday, May 25, 2018 3:37 PM

All replies

  • >I need to intercept all outgoing email sent from a mailbox (shared with some clients like Outlook,Owa or mobile) because I need to modify the subject (append a personal code to it, or a signature to the body) butbefore the email is sent to the final recipient.

    You can't do that with notifications, they are only designed as a notification mechanism so can't be used to make the type of changes you need. You would need to use an Outlook Addin to capture the Send Event at the client side or a Transport Agent to catch the message while its in the Transport pipeline. 

    The message that is stored in the SentItem folder is just a copy of what is sent, stored after Submission.

    Cheers
    Glen

    Monday, May 28, 2018 5:14 AM
  • Thanks Glen for your reply.

    The problem is that we use Exchange Online, so a SAAS Environment, not a IAAS.

    For this reason I don't have an access to OS (and my app)  to generate a personal code (eg. random) to modifiy the subject, in Exchange online it's possible to inject only a static string in the mail flow.

    Moreover what if I use another client further an Outlook? ( mobile, web, MAC, an so on.)

    I understand that its by design, but I hope to a workaround.

    Cheers,

    MAtteo

    Monday, May 28, 2018 11:50 AM
  • Unfortunately there is no way to direct support what your trying to do outside of what you can do at the client level with Outlook Addin (so the will work in all the Outlook clients Desktop, Web,Outlook Mobile etc). You could change the subject or append text with a Mail Flow rule but as you have mentioned they can be static

    Why do you need to add a code for ? eg a Message will have a Unique MessageId when its sent so this maybe something you can use in place of your own code ?. The other method would be to build an APP for whatever process you need to use this for and change the user behavior to use the App when they are doing the particular workload (not an easy thing I know but it possible if the App saves them time).

    Tuesday, May 29, 2018 4:53 AM
  • Thanks again Glen.

    I need to add a code for a ticketing system.
    I'm trying to migrate an on premise  Lotus Domino that already do that to the Azure Cloud and in particulary in Exchange Online (SAAS) to avoid to mantain on prem hardware.

    We have some office around the world and different kind of mail client, so it's mandatory to do that by server side, to avoid the deploy a nightmare and to keep all centralized.

    Regards.

    Matteo

    Tuesday, May 29, 2018 10:13 AM