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

Notify-mailer: save and reuse resolved email addresses #7979

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

lenaunderwood22
Copy link
Contributor

@lenaunderwood22 lenaunderwood22 commented Jan 24, 2025

Add saveEmailsTo and readEmailsFrom optionals flags to notify-mailer to enable saving and reusing work to resolve email addresses.

  • The saveEmailsTo is the filename of where to save resolved address/recipient data
  • The readEmailsFrom is the filename of where to read resolved address/recipient data.

New use cases:

  1. Save resolved address/recipient data for reuse: Set the saveEmailsTo flag and notify-mailer will run and save resolved address/recipient data to the specified file.
  2. Use previously saved address/recipient data to send emails: Set the readEmailsFrom flag and notify-mailer will extract the saved recipient data to send emails, instead of redoing the work to resolve addresses.
  3. Send emails in batches: Set both the readEmailsFrom and saveEmailsTo flags. Notify-mailer will read the addresses in readEmailsFrom 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 in readEmailsFrom are saved to the saveEmailsTo 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 and readEmailsFrom flags if email body is exactly the same regardless of recipient.

@lenaunderwood22 lenaunderwood22 marked this pull request as ready for review January 28, 2025 17:04
@lenaunderwood22 lenaunderwood22 requested a review from a team as a code owner January 28, 2025 17:04
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.

1 participant