Notify-mailer: save and reuse resolved email addresses #7979
+395
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
saveEmailsTo
andreadEmailsFrom
optionals flags to notify-mailer to enable saving and reusing work to resolve email addresses.saveEmailsTo
is the filename of where to save resolved address/recipient datareadEmailsFrom
is the filename of where to read resolved address/recipient data.New use cases:
saveEmailsTo
flag and notify-mailer will run and save resolved address/recipient data to the specified file.readEmailsFrom
flag and notify-mailer will extract the saved recipient data to send emails, instead of redoing the work to resolve addresses.readEmailsFrom
andsaveEmailsTo
flags. Notify-mailer will read the addresses inreadEmailsFrom
and then resolve addresses from the input recipients file if the address is NOT in readEmailsFrom. After resolving and sending to the new recipients, the combined set of addresses sent by the current run and seen inreadEmailsFrom
are saved to thesaveEmailsTo
file.Important Note: doing a batch send (case 3) WILL NOT WORK entirely correctly if the email body includes recipient-specific data (e.g. embedding recipient's certificate domain names). Only use both
saveEmailsTo
andreadEmailsFrom
flags if email body is exactly the same regardless of recipient.