小编Hit*_*itu的帖子

在没有GMail的nodejs中使用nodemailer进行SMTP

我在GMail中使用节点邮件程序

smtpTransport = nodemailer.createTransport("SMTP", {
    service: "Gmail",
    auth: {
        user: "myemail ",
        pass: "mypass"
    }
});
Run Code Online (Sandbox Code Playgroud)

一切正常,但我想使用自己的电子邮件服务器而不是GMail。

这个:

smtpTransport = nodemailer.createTransport("SMTP", {
    service: "mymailservr link url",
    port : 25
    auth: {
        user: "myemail ",
        pass: "mypass"
    }
});
Run Code Online (Sandbox Code Playgroud)

它引发此错误:

连接ECONNREFUSED

email node.js nodemailer

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

email ×1

node.js ×1

nodemailer ×1