Good.
You're going to need to put code in QueryDocumentDelete of the Database Script. What code to put is going to depend on how you want to deal with the issue.
You have two possibilities : leave the apparent functionality as is and trace deletions, or lock down the normal delete function and force users to use a Delete button that allows you to trace deletions more formally.
In one case, you'll be using stealth surveillance, in the other, you'll be coding a lot more.
Bear in mind that either solution is going to make upgrading the server a more complicated chore - especially if you go for the lock-down solution.
If you simply trace deletions, you will want to log some information in the mail db. You'll need the sender, the timestamp and probably the subject. You might want the full recipient list, or even more info - that's up to you to decide.
This information should be written in Record documents that the user cannot delete. You can also create a hidden Record view, so the user is not permanently reminded of the function.
Ideally, you'll want to purge the trace info every now and then, so that the user is not continually complaining that his mail db is getting too big. Or even better, move the Records to a central database where you can keep trace of them longer. You can even move the whole mail in that case (minus the attachments, obviously).
If you go for the blatant lock down, you'll have to modify just about every view, include a Delete button in every Form, and change the QueryDocumentDelete code as well.
Either way, upgrading the mail template will no longer be straightforward at all.
So, which solution has your preference ?
Pascal.