Mailspring/packages/client-sync/src
Christine Spang 84a3b20839 [client-sync] Refresh SMTP client when auth credentials change
Summary:
Previously, we would create a nodemailer SMTP transport object when the
sync worker booted up. The transport object would be passed the account
SMTP credentials at the time of object creation. If the Google auth
token later expired, we would continue to try to send mail using the
expired token, resulting in "Invalid login" failures.

This patch makes it so we refresh the transport object if the auth token
changes, and also turns on SMTP connection pooling to limit simultaneous
SMTP connections (& maybe make sending multiple messages faster).

Fixes T7891

Test Plan: manual

Reviewers: juan, halla

Reviewed By: juan, halla

Subscribers: mark

Maniphest Tasks: T7891

Differential Revision: https://phab.nylas.com/D3997
2017-02-21 16:24:24 -08:00
..
local-api [*] move to monorepo 2017-02-16 18:46:26 -08:00
local-sync-dashboard [client-*] Rename packages folders and update readme 2017-02-16 13:31:37 -08:00
local-sync-worker [client-sync] Refresh SMTP client when auth credentials change 2017-02-21 16:24:24 -08:00
message-processor [local-sync] Differentiate sync loop & other errors by additional fingerprint info 2017-02-17 14:03:24 -08:00
models [client-app, client-sync] Save imap folder names in the client-app 2017-02-17 14:47:10 -08:00
shared [*] move to monorepo 2017-02-16 18:46:26 -08:00