node.js - 无法使用 nodemailer 从我想要的域发送电子邮件

标签 node.js email nodemailer mail-server

我正在编写脚本以使用 nodmailer 包从我的域发送电子邮件,我的代码如下:-

    /************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************/

运行时,出现以下错误:

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"

最佳答案

看来您可能需要升级到通配符 SSL 证书(涵盖 *.digieasynow.com)。这样您就可以使用任意数量的子域。

关于node.js - 无法使用 nodemailer 从我想要的域发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43958815/

相关文章:

ruby-on-rails - rails : Simplest way of sending mail when X is true

node.js - Windows 10 邮件渐变不显示

node.js - 使用 Async/Await 的 Nodemailer 电子邮件确认

node.js - 我可以使用 MongoDb 驱动程序从 node.js 调用 rs.initiate() 和 rs.Add() 吗?

javascript - 如何让特定的 d3 Node 成为力导向图中的图像?

node.js - Node.js 中的条件管道流

android - 发送电子邮件时未找到处理 Intent 的 Activity

c# - 为什么发送电子邮件需要这么长时间?

node.js - 使用 util.promisify 的响应时间差异

node.js - 有类似 Perl 的 Catalyst 路由的 Node.js 吗?