none
Possible plug-ins conflict - modify email body / encryption. RRS feed

  • Question

  • Hi,
    I would like to ask you about possible outlook plugin conflict.
    Let's assume we have 2 custom outlook add-ins. First plugin modifies email body appending some text and the second plugin encrypts email body.
    Each plugin is developed by different company. Custom actions in both plug-ins are invoked when user sends email.

    Questions:
    1) How will this work when we have "subscribed" Send event in both plugins? First plugin appends some text but will be this "new" text taken into account when doing encryption in the second plugin?
    Is it possible to control "the order" e.g. by admin settings when admin is aware about all custom plugins? Or how to handle this cases?

    2) Similar, when we have some email footer configured to append to each email e.g. job title, address etc.. will be these information available to custom plugins (part of email body)?

    3) Will be always email Sent to Exchange server just once (not duplicated)? Assumed not custom sending code, just email modifications in custom plug-ins. 

    Please, could anybody explain how this works/answer my questions?



    Many thanks.

    Regards,
    Tomas

    Monday, October 21, 2013 1:42 PM

Answers

  • When you process Application.ItemSend or MailItem.Send event, you do not call Send again - Outlook will proceed with the message submission unless you (or some other event sink) sets the Cancel parameter to true. The order in which the event handlers are invoked is undetermined.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Tomasiino Monday, October 21, 2013 6:41 PM
    Monday, October 21, 2013 5:40 PM

All replies

  • 1. There is no way to control the order in which the addins are loaded or events are processed.

    2. It all depends o the order, which you cannot control

    3. Do you mean whether a message sent to multiple Exchange mailboxes be stored only once?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, October 21, 2013 2:07 PM
  • Regarding point 3) 
    I am new to plugin development therefore I try to get some information how the events work and what is possible to do.
    I assume I am able to subscribe to "Send" event to invoke some custom code before email is sent to Exchange server.
    I can do some custom modifications with email (append text, add custom email header etc...) and then I guess I have to tell outlook to send email (MailItem.Send method?) to indicate my changes are completed.
    But what about when there are other plugins doing also some custom modifications? And also calling Send method. I assume email is sent just once to Exchange server.

    Or how does this really work? Does Outllok wait for all subscribers (plugins subscribing Send event) to complete and call Send method? Is email then really sent and just once?
    I also hope there is some kind of isolation - unhandled exceptions / errors in one plugin does not have any impact on other plugin? Is it true?

    Many thanks.

    Regards,
    Tomas

    Monday, October 21, 2013 5:35 PM
  • When you process Application.ItemSend or MailItem.Send event, you do not call Send again - Outlook will proceed with the message submission unless you (or some other event sink) sets the Cancel parameter to true. The order in which the event handlers are invoked is undetermined.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Tomasiino Monday, October 21, 2013 6:41 PM
    Monday, October 21, 2013 5:40 PM