Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nodemailer): use default value for maxMessages #252

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

LoneRifle
Copy link
Contributor

@LoneRifle LoneRifle commented Jul 3, 2020

Problem

maxMessages is set at Infinity, which encourages long-living SMTP
connections. This may not work well with services like AWS SES' SMTP
relays, whose machines are ephemeral and may be culled without notice.

Solution

Rely on nodemailer's default of 100 messages per [1]. This allows us
to discard and replace connections to better ensure we are talking to
a live connection. Problems with connection leaks were fixed in
nodemailer 6

References:
[1] - https://nodemailer.com/smtp/pooled/

`maxMessages` is set at `Infinity`, which encourages long-living SMTP
connections. This may not work well with services like AWS SES' SMTP
relays, whose machines are ephemeral and may be culled without notice.

Rely on nodemailer's default of 100 messages per [1]. This allows us
to discard and replace connections to better ensure we are talking to
a live connection. Problems with connection leaks were fixed in
nodemailer 6

References:
[1] - https://nodemailer.com/smtp/pooled/
@LoneRifle LoneRifle force-pushed the nodemailer-maxmsgs-default branch from fb3063d to 9b8b988 Compare July 3, 2020 03:41
@LoneRifle LoneRifle merged commit 4dc5fb3 into develop Jul 3, 2020
@LoneRifle LoneRifle deleted the nodemailer-maxmsgs-default branch July 3, 2020 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants