Skip to content

refactor: preserve original part order in multipart/related handling …#209

Merged
maneeshaxyz merged 1 commit intomainfrom
208-bug-email-parts-are-not-fetched-from-the-server
Jan 25, 2026
Merged

refactor: preserve original part order in multipart/related handling …#209
maneeshaxyz merged 1 commit intomainfrom
208-bug-email-parts-are-not-fetched-from-the-server

Conversation

@Aravinda-HWK
Copy link
Copy Markdown
Collaborator

@Aravinda-HWK Aravinda-HWK commented Jan 22, 2026

📌 Description

This PR is to resolve the part number problem for a normal mail client, like Gmail


🔍 Changes Made

  • Initially, part numbers were like 1-n numbers, but now it changed to for each parent, its children's parts start counting from 1.
  • When fetching the mail from the database, it should now change based on the database id not the part number.( Changed this)
  • Remove unused sortMultipartRelatedChildrenand prepareMultipartRelated because when they are stored in the database, they are sorted, and preparation is also the same.
  • Check if we have a single root multipart container. If so, skip it and use its children as IMAP top-level parts. (Updated in the fetch.go)

✅ Checklist (Email System)

  • Core IMAP commands tested (LOGIN, CAPABILITY, LIST, SELECT, FETCH, LOGOUT).
  • Authentication is tested.
  • Docker build & run validated.
  • Configuration loading verified for default and custom paths.
  • Persistent storage with Docker volume verified.
  • Error handling and logging verified
  • Documentation updated (README, config samples).

🧪 Testing Instructions

To test the server, use the instructions in the README in the test directory.


📷 Screenshots / Logs (if applicable)


⚠️ Notes for Reviewers

Run the email server, connect to a few different types of MUA, and check the email by sending different type of emails.

@Aravinda-HWK Aravinda-HWK self-assigned this Jan 22, 2026
@Aravinda-HWK Aravinda-HWK linked an issue Jan 22, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@Aravinda-HWK Aravinda-HWK marked this pull request as ready for review January 22, 2026 17:32
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@maneeshaxyz maneeshaxyz merged commit 13486e0 into main Jan 25, 2026
7 checks passed
@Aravinda-HWK Aravinda-HWK deleted the 208-bug-email-parts-are-not-fetched-from-the-server branch January 27, 2026 04:20
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.

[BUG] Email parts are not fetched from the server

2 participants