I am writing script to send email from my domain using nodmailer package, my code is below:-
/************send email **************/
var nodemailer = require('nodemailer');
var transporter = createTransport('smtp://admin@digieasynow.com:paxxxxxxxxx
@mail.digieasynow.com');
var mailOptions = {
from: '"Tester 👥" admin@digieasynow.com',
to: 'example@gmail.com',
subject: 'Hello ✔',
text: 'Hello world 🐴',
html: 'Hello world 🐴'
};
transporter.sendMail(mailOptions,function(error, info){
if(error){
return console.log(error);
}
console.log('Message sent: ' + info.response);
});
/**End code here************/
On running it gives below error..........................
Error: Hostname/IP doesn't match certificate's altnames: "Host: mail.digieasynow.com. is not in the cert's altnames: DNS:.webhostbox.net, DNS:webhostbox.net"
Please help....................
via amish ges
No comments:
Post a Comment