Reputation: 1
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
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: http://nodemailer.com/smtp/proxies/
Upvotes: 0
Views: 21