[SES-PHASE-1-9] - PLU-744: send attachments with ses#1636
Draft
m0nggh wants to merge 1 commit into
Draft
Conversation
This was referenced May 20, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b152844 to
fcf855e
Compare
84dc544 to
53296e1
Compare
53296e1 to
7b79c60
Compare
fcf855e to
1741d4f
Compare
a8e25ed to
13c52ce
Compare
0d5d0c3 to
9ed7d91
Compare
13c52ce to
0adf3aa
Compare
9ed7d91 to
91509c9
Compare
3717a82 to
c23f3e0
Compare
d903145 to
de10911
Compare
c23f3e0 to
bfbc0d9
Compare
de10911 to
6cc0f29
Compare
bfbc0d9 to
0fa7e2e
Compare
6cc0f29 to
f9b2bb3
Compare
0fa7e2e to
2690b61
Compare
2690b61 to
95c9c94
Compare
f9b2bb3 to
09f6135
Compare
09f6135 to
eb4acd4
Compare
95c9c94 to
8b197ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

DRAFT, MAY DO THIS IN PHASE 2 INSTEAD
TL;DR
SES email routing now supports attachments via raw MIME, removes the previous attachment-blocks-SES restriction, and expands the set of file types accepted at upload time.
What changed?
sendEmailViaSesnow builds a raw MIME message usingnodemailer'sMailComposerwhen attachments are present, allowing SES to carry attachments rather than falling back to Postman.BLOCKED_ATTACHMENT_EXTENSIONS) that drops known executable/script types (.exe,.bat,.ps1,.vbs, etc.) before sending. The denylist is applied both upstream (infilterSesAttachments) and defensively insidesendEmailViaSes.filterAttachments.ACCEPTED_FILE_TYPESon both frontend and backend is expanded to include SES-only types (SVG, WebP, HEIC, ZIP, RAR, JSON, XML, ICS, Markdown, EML, MSG, MP4, WebM). These types are accepted at upload time but may still be rejected at send time on the Postman path.nodemailerand@types/nodemaileradded as dependencies.How to test?
ses_enabled_domainsflag for a test domain..pdf,.png) to a recipient in that domain — confirm it is delivered via SES with the attachment intact..exe) — confirm it is filtered out and a warning is logged, but the email still sends with remaining valid attachments..zip,.mp4) and confirm it is accepted at upload time and delivered when routing via SES.Why make this change?
The original SES Phase 1 implementation blocked all attachments to keep the routing logic simple. This change lifts that restriction by using raw MIME encoding, enabling SES to handle the same attachment use cases as Postman while applying a security-focused denylist instead of Postman's narrower allowlist. This also allows a broader set of file types to be uploaded and delivered when the SES path is active.