feat(notificaciones): mass email notifications over SES
Replaces the four legacy PHP scripts under email.notifications/send*.php with a single NestJS module. Four jobs (outstanding payments, payment confirmations, account-status alerts with day-of-week gates, trust payment confirmations) share one MailService modelled on StorageService: env-driven SES client, null fallback in dev with console logging, refuses to send in production when unconfigured. Schema adds email_notification_log (every attempt, sent/failed/skipped) and account_status_history (one row per threshold hit, Job 3). Enums encode the legacy wire shape so external log scrapers keep parsing notificationType keys verbatim. Web adds /notificaciones with four trigger cards, a flags panel, and a paginated log browser. New notification:send ability gates all four endpoints at MANAGER, matching the renewal:send trust tier.
This commit is contained in:
@@ -33,3 +33,20 @@ COMPANY_EMAIL=
|
||||
COMPANY_TAX_ID=
|
||||
COMPANY_WEBSITE=
|
||||
COMPANY_LOGO_PATH=
|
||||
|
||||
# Outbound mail (Amazon SES — the channel the office already uses for bulk
|
||||
# notification, see docs/MASS_EMAIL_NOTIFICATIONS.md). Without all four
|
||||
# vars the API still boots; in dev the MailService logs sends to stdout,
|
||||
# in production every send throws ServiceUnavailableException.
|
||||
SES_REGION=
|
||||
SES_ACCESS_KEY=
|
||||
SES_SECRET_KEY=
|
||||
SES_FROM=mail@jorgecuadros.com
|
||||
SES_FROM_NAME=Information Server
|
||||
# Optional — bounce/complaint event publishing configuration set.
|
||||
SES_CONFIGURATION_SET=
|
||||
|
||||
# Comma-separated addresses that receive the per-job admin summary email
|
||||
# (one summary per address, JSON body, sent after every sweep). Defaults to
|
||||
# the legacy pair if unset.
|
||||
NOTIFICATION_ADMIN_EMAILS=rmancinas@freakma.net,mpulido@freakma.net
|
||||
|
||||
Reference in New Issue
Block a user