Should this be inside the if statement as it only applies to SMTP?