You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick summary what's this feature request about.
I would like to send emails from several domains, as my backend hosts several domains.
Why is it needed?
I want clients to receive emails from the domain that is associated with the project
Suggested solution(s)
I know i can manually send from several transporters but i have no idea on how to use it with your layouts.
const nodemailer = require('nodemailer');
// Transporter for the first identity
const transporter1 = nodemailer.createTransport({
host: 'smtp.first-server.com',
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: '[email protected]',
pass: 'password1'
}
});
// Transporter for the second identity
const transporter2 = nodemailer.createTransport({
host: 'smtp.second-server.com',
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: '[email protected]',
pass: 'password2'
}
});
// Example of sending an email with the first identity
transporter1.sendMail({
from: '[email protected]',
to: '[email protected]',
subject: 'Email from first identity',
text: 'This is the email content.'
}, (err, info) => {
if (err) {
console.error(err);
} else {
console.log('Email sent: ' + info.response);
}
});
// Example of sending an email with the second identity
transporter2.sendMail({
from: '[email protected]',
to: '[email protected]',
subject: 'Email from second identity',
text: 'This is the email content.'
}, (err, info) => {
if (err) {
console.error(err);
} else {
console.log('Email sent: ' + info.response);
}
});
A clear and concise description of what you want to happen.
Suggest a solution
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request.
The text was updated successfully, but these errors were encountered:
Feature request
Use multiple transporters
Summary
Quick summary what's this feature request about.
I would like to send emails from several domains, as my backend hosts several domains.
Why is it needed?
I want clients to receive emails from the domain that is associated with the project
Suggested solution(s)
I know i can manually send from several transporters but i have no idea on how to use it with your layouts.
A clear and concise description of what you want to happen.
Suggest a solution
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request.
The text was updated successfully, but these errors were encountered: