Lawrence Dsouza
Lawrence Dsouza

Reputation: 1

Does Nodemailer have a proxy parameter? Am I doing something wrong?

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: http://nodemailer.com/smtp/proxies/

Upvotes: 0

Views: 21

Answers (0)

Related Questions