moved SMTP parameters to different functions