Added port and useTLS handling to Mailer.