Comments (2)
Well, currently there's an undocumented feature to achieve similar behavior - you can add a configuration profile to the e-mail options object with the key "server"
var connection_profile1 = {
host: "smtp.gmail.com",
user: "[email protected]"
}
var connection_profile2 = {
host: "smtp.yahoo.com",
user: "[email protected]"
}
var mail_data = {
from:"[email protected]",
to:"[email protected]",
subject: "test e-mail",
text: "Hello there!",
server: connection_profile1 // <- overwrites nodemailer.SMTP for this e-mail
};
nodemailer.send_mail(mail_data, callback);
But doing this a bit more structured way might be a really good feature. I'll have to think about it a bit.
from nodemailer.
I've discovered it soon after taking a look at the source code. I have patched nodemailer to have a PROFILES object which stores the configuration profiles, and patched send_mail and EmailMessage to accept an additional profile parameter. I'll commit and send a pull request as soon as I test it.
from nodemailer.
Related Issues (20)
- Missing credentials for "PLAIN" HOT 4
- I having trouble with import nodemailer from 'nodemailer' HOT 6
- s
- Nodemailer - Cannot send message - smtp connection socket is already destroyed. HOT 4
- Emails sent with iCloud email in the 'from' field not reaching the inbox HOT 3
- Hostname/IP does not match certificate's altnames but certification is correct. HOT 4
- connect ETIMEDOUT ERROR HOT 2
- Not Sending Email (Error: Missing credentials for "PLAIN") HOT 6
- What would be the recipe to encrypt the email with sender's certificate HOT 2
- Too long URLs in the List-Unsubscribe header causes the DKIM signature verification to fail HOT 4
- Invalid login: 535-5.7.8 Username and Password not accepted HOT 4
- Nodemailer not working in my ubuntu vps server, but works on localhost (windows) both development and production HOT 1
- Nodemailer is not working in production HOT 2
- Github-Actions closing valid issues HOT 2
- SES Email transport throttling callback HOT 2
- Azure Functions v4 - Authentication Unsuccessful HOT 2
- nodemailer authorisation error due to MFA HOT 2
- UNHANDLED PROMISE REJECTION node js HOT 2
- help UNHANDLED PROMISE REJECTION The promise rejected with the reason "SMTP ERROR => connect ETIMEDOUT 52.101.151.0.25".] { HOT 1
- Allow usage of `https://www.googleapis.com/auth/gmail.modify` Gmail OAuth scope HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodemailer.