move SMTP code out from within S3 logging. they should be independent.