Tweaks to email functionality