Skip to content

feat(handler): Phase 3G — multipart MIME, attachments, folder-per-email - #12

Merged
smallchungus merged 5 commits into
mainfrom
phase-3g-mime-attachments
Apr 18, 2026
Merged

feat(handler): Phase 3G — multipart MIME, attachments, folder-per-email#12
smallchungus merged 5 commits into
mainfrom
phase-3g-mime-attachments

Conversation

@smallchungus

Copy link
Copy Markdown
Owner

Phase 3G: cloudhq-equivalent output.

  • internal/handler/mime.go: parseMessage walks the MIME tree, extracts HTML/text body parts and attachments (base64/quoted-printable decoding included).
  • Attachments written to /attachments// by RenderHandler.
  • render.go emits meta.json with subject, from_email, received_at, attachment_names — cross-stage data for upload.
  • upload.go reads meta.json, ensures per-email folder named _, uploads email.pdf + each attachment.
  • Path helpers (SubjectSlug, FromSlug, EmailFolderName, SanitizeFilename) — pure unit-tested.
  • Final Drive layout: /2026/04/18/2026-04-18_103045_re-project-update_alice/{email.pdf, report.pdf, ...}

Now genuinely cloudhq-equivalent for emails (minus OCR, inline-image embedding, exotic multipart/related cases — explicitly out of scope).

@smallchungus
smallchungus merged commit 3b3047f into main Apr 18, 2026
@smallchungus
smallchungus deleted the phase-3g-mime-attachments branch April 18, 2026 14:16
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.

1 participant