BE - Nodemailer too many login attempts
If too many emails are sent Google SMTP server gives a too many login attempts error.
This should be resolvable by pooling SMTP connection:
this.transporter = nodemailer.createTransport({
pool: true,
host: process.env.SYSTEM_EMAIL_HOST,
port: process.env.SYSTEM_EMAIL_PORT,
secure: true, // Use `true` for port 465, `false` for all other ports
auth: {
user: process.env.SYSTEM_EMAIL_ADDRESS,
pass: process.env.SYSTEM_EMAIL_PASSWORD,
},
});
but this doesn't seem to be working.
I'm not certain whether this is an actual issue with connections or Google rate limiting us.
Might need to move to a different mail server.
Hi @ajhollid,
I wanted to suggest that we could potentially resolve the issue by closing the transporter pool after use. This might help us manage connections more effectively and reduce the likelihood of hitting Google’s rate limits.
Let me know your thoughts.
For this issue, I assume Google SMTP is not the right choice as it can be rate limited easily. For a serious setup, SendGrid, Mailgun, Postmark or alike should be used. They allow higher email limits and better control over email queues. Hence I am inclined to close this issue unless you have another opinion @ajhollid
Agreed, I think this can be closed