Add block-level comments.
Add docstrings.
Unlink the temporary file after successful delivery
Implement clean() method to keep tmpdir pleasant.