fix: server email dispatch retries on error
fix: server close use WriteSync