adapting so that it can properly work with AWS SES in our case