23 lines
1.1 KiB
JavaScript
23 lines
1.1 KiB
JavaScript
/**
|
|
* Payload email adapter backed by the SMTP settings in the SiteIntegrations
|
|
* global.
|
|
*
|
|
* Why this exists: Payload builds its email adapter once, at boot, from the
|
|
* config — which would normally mean SMTP credentials living in env vars and a
|
|
* redeploy to change them. This adapter instead resolves SMTP on every send, so
|
|
* an editor can change the mailbox in the admin panel and the next email uses
|
|
* it.
|
|
*
|
|
* Wiring it into the config means `payload.sendEmail` works everywhere — which
|
|
* includes the form-builder's own submission emails (the ones an editor
|
|
* configures per form under "Emails"). Those go out over the panel's SMTP with
|
|
* no extra code.
|
|
*
|
|
* Boot-time constraints shape two details:
|
|
* - `defaultFromAddress` / `defaultFromName` must be returned synchronously, so
|
|
* they're placeholders; the real from-address is applied per message below.
|
|
* - nodemailer is imported dynamically inside sendEmail, so merely loading the
|
|
* Payload config (or running `generate:importmap`) doesn't pull it in.
|
|
*/ export { };
|
|
|
|
//# sourceMappingURL=panelSmtpAdapter.d.js.map
|