27045ec.
Context and decision drivers
After generating a PDF, the service must email it to the recipients supplied in the report request. The expected volume is small. The team wanted a familiar library without adopting a paid email API solely for this workflow.Options considered
Decision and rationale
Use Nodemailer to send the generated PDF as an attachment through the configured email service. Nodemailer itself is free, while the configured service may have its own limits or charges.Consequences
- Email delivery remains part of the application workflow.
- The service depends on the configured provider’s availability, credentials, and sending limits.
- A successful
sendMailcall does not establish that a recipient received or read the email. - Credential handling, retry policy, and delivery monitoring need separate operational controls.