Skip to content

Add SMTP attachment support#124

Draft
diesdasjunge wants to merge 1 commit into
opencoredev:mainfrom
diesdasjunge:add-attachments-to-smtp-adapter
Draft

Add SMTP attachment support#124
diesdasjunge wants to merge 1 commit into
opencoredev:mainfrom
diesdasjunge:add-attachments-to-smtp-adapter

Conversation

@diesdasjunge

@diesdasjunge diesdasjunge commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Adds attachment support to the built-in SMTP adapter using the existing EmailAttachment API and shared attachmentToBytes() helper.

SMTP now accepts attachments, builds dependency-free MIME payloads, and becomes a valid fallback route for attachment-bearing messages while continuing to reject unsupported tags and metadata.

What Changed

  • Enables attachments in SMTP field support.
  • Builds the full MIME payload before opening an SMTP socket.
  • Emits multipart/mixed when attachments are present.
  • Nests multipart/alternative for text + HTML bodies.
  • Supports raw string, Base64 string, byte, and file-backed attachments.
  • Adds conservative validation for attachment filenames, content types, content IDs, and dispositions.
  • Documents SMTP attachment support and the timeoutMs consideration for large attachments.
  • Adds a minor changeset and updates the package changelog.

Verification

  • bun test packages/email-sdk/src/smtp.test.ts
  • bun test packages/email-sdk/src/cli.test.ts
  • bun test packages/email-sdk
  • bun run check-types
  • bun run release:ci

Notes

  • SMTP still rejects tags and metadata.
  • Inline attachments emit Content-ID, but richer inline-image behavior is intentionally not advertised beyond that.
  • Large attachments on slow SMTP links may require increasing timeoutMs.

@tripwire-prod

tripwire-prod Bot commented Jul 5, 2026

Copy link
Copy Markdown

Tripwire: This PR was automatically closed.

Reason: @diesdasjunge does not have a profile README.

Think this was a mistake? Request a review as @diesdasjunge

@tripwire-prod tripwire-prod Bot closed this Jul 5, 2026
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

@diesdasjunge is attempting to deploy a commit to the OpenCore Team on Vercel.

A member of the Team first needs to authorize it.

@leoisadev1 leoisadev1 reopened this Jul 7, 2026
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.

2 participants