updated node mail code for latest version of nodemailer