简体   繁体   中英

Exchange Transport Agent Bounce MailItem

In our Exchange RoutingAgent , we would like to be able to bounce an email back to the sender in the event of an unexpected exception. We would also like to be able to send the bounce message to some pre-defined admin email too if possible. Is there any way to bounce a message in the OnSubmittedMessage or the OnResolvedMessage events? I am hoping there is some method in the Exchange libraries to easily achieve this, or is there some way to create a new MailItem and send it to the original sender and possibly an admin?

You need to generate a new message to do that there is a sample for this on https://blogs.msdn.microsoft.com/mstehle/2010/03/10/howto-return-to-sender-transport-agent-sample/

You should also be able to use https://msdn.microsoft.com/en-us/library/jj976002(v=exchg.150).aspx

Cheers Glen

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM