refactor nodemailer with environment variables