fixes to email adapter creation