EmailSendingNotification - is it possible to prevent further processing (e-mail sending)
We have our own e-mail sending code which we trigger from inside the EmailSendingNotification's Handle() method, and would like to stop Vendr from continuing with its own e-mail sending process at this point. Is that possible? E.g. a "Cancel" property or similar in the EmailSendingNotification class would be convenient.
Rather than hooking into the EmailSendingNotification you'd probably be better off replacing the SendEmailTask pipeline task that is used as part of the send email pipeline.
So you could tweak that to do what you need to do then check the docs here for working with pipelines https://vendr.net/docs/core/3.0.0/key-concepts/pipelines/ You'll want to call Replace<SendEmailTask, MySendEmailTask>() to swap the implementation.
EmailSendingNotification - is it possible to prevent further processing (e-mail sending)
We have our own e-mail sending code which we trigger from inside the EmailSendingNotification's Handle() method, and would like to stop Vendr from continuing with its own e-mail sending process at this point. Is that possible? E.g. a "Cancel" property or similar in the EmailSendingNotification class would be convenient.
Hey Tor,
Rather than hooking into the EmailSendingNotification you'd probably be better off replacing the
SendEmailTask
pipeline task that is used as part of the send email pipeline.This is the current pipeline task code
So you could tweak that to do what you need to do then check the docs here for working with pipelines https://vendr.net/docs/core/3.0.0/key-concepts/pipelines/ You'll want to call
Replace<SendEmailTask, MySendEmailTask>()
to swap the implementation.Hope this helps
Ok, thanks! I started doing this over the weekend, and this confirmed my approach.
Hi Matt,
I'm using vendr 1.8.6 and this line of code doesn't work:
The SendEmailTask doesn't exist. Could you correct it for me?
Thanks, Nick
I figure it out, this works for vendr version 1.8.6:
Cheers
is working on a reply...