Refactor the email sender
merge