revert changes to mail sender except for the "process" flag to help
shut down the thread.