Fixed bug in email_adapter