SMTP template clean up