Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Help - Best way to temporarily store outbound emails and release them later on command via custom transport agent

$
0
0

Hi,

I have thought of two possible solutions to a problem we are having and am interested in getting some expert opinions on both.

Problem: we have a custom exchange transport agent which analyses outbound emails as they pass through the exchange.  If certain conditions are met, then it needs to temporarily store this email whilst it sends an automated email to the sender asking for permission to release / delete.  When the sender replies yes / no, it then must either delete the email or release it for sending again.

Solution 1 (current): we use a SQL database and write the email to this, storing a unique ID as key and the email parts with it (including attachments).  When the user response comes in, we use the email key to located the correct email and either delete it or rebuild the email and put in pickup folder to be sent

Solution 2: we could use a new exchange mailbox and redirect the email to it for holding.  When user sends the response we then access the mailbox and resend the email, hopefully since the email was redirected it would be sent as the original.

Questions:

- I'm not 100% sure of our current implementation of storing/restoring the email in the SQL database (I didn't implement it), but from a technical / feasibility PoV, should this be okay and is it possible to always restore the email correctly without losing any info?

- If we went with mailbox approach, is it possible to redirect email from transport agent?  Is it also possible to access mailbox and resend email from it via our transport agent code?

Any other ideas on how we could implement this would be greatly appreciated :-).

Thanks!

Tom


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>