admin管理员组文章数量:1279208
const nodemailer = require('nodemailer');
const createTransporter = async (user, passowrd, host) => {
const transporter = nodemailer.createTransport({
host: host,
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: user, // generated ethereal user
pass: passowrd, // generated ethereal password
},
pool: true,
debug: true,
maxMessages: 'Infinity',
maxConnections: 5,
proxy: 'http://*.*.*.*:*',
});
};
According to the documentation, it says to just pass the proxy parameter in the payload. I have done the same thing, but I am unable to find the proxy parameter inside the Nodemailer implementation
enter image description here
enter image description here
Additionally, I'm getting a "connection refused" error.
The Nodemailer version I am using is 6.10.0.
Am I doing something wrong here?
I also tried using this:
const transporter = await createTransporter(usr, pwd, host);
transporter.setupProxy('http://*.*.*.*:*');
but it didn't work.
References: /
本文标签: nodejsDoes Nodemailer have a proxy parameter Am I doing something wrongStack Overflow
版权声明:本文标题:node.js - Does Nodemailer have a proxy parameter? Am I doing something wrong? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741209805a2358884.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论