.total_seconds compat for python 2.6.
Fix typo in mail backend.
Update handle_batch to use the new detail model.