Fixed email issue for s3 upload