Tweak to email send code