Fixed bug in MailSender.authenticate