fix(imap): fix mojibake in nested emails, empty headers, and date handling#909
fix(imap): fix mojibake in nested emails, empty headers, and date handling#909dreamhunter2333 merged 3 commits intomainfrom
Conversation
…dling - Add line-by-line mojibake fix fallback for complex emails with mixed content - Apply empty header cleanup globally to fix nested message/rfc822 parts - Add locale-independent date formatting (format_imap_date, format_rfc2822_date) - Fill missing Date header from created_at field - Fix getSubPart for non-multipart messages - Accept CREATE requests from clients (e.g. Gmail creating Drafts) - Strip whitespace from IMAP password - Use MIMEText instead of MIMEMultipart for sent mail generation - Keep body in original CTE encoding for correct BODYSTRUCTURE - Update CHANGELOG (zh/en) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough本次变更在 IMAP 邮件处理链中引入多项修复与增强:修正嵌套回复的 UTF‑8 乱码、清理空 Content‑Type 导致的 multipart 解析失败、在缺失 Date 时使用 created_at 补齐,并修复因 locale 导致的 INTERNALDATE 解析问题,同时调整账号/邮箱创建行为与若干解析/模型接口。 Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
User description
Summary
Test plan
🤖 Generated with Claude Code
PR Type
Bug fix, Enhancement
Description
Fixed UTF-8 mojibake in nested emails with fallback mechanisms.
Resolved issues with empty headers in Gmail emails.
Enhanced handling of missing
Dateheaders in emails.Dateheader usingcreated_atfield with locale-independent formatting.Improved IMAP server functionality and compatibility.
Diagram Walkthrough
File Walkthrough
3 files
Strip whitespace from IMAP passwordFix mojibake and clean headers in raw emailsEnhance email parsing with mojibake fix and header cleanup2 files
Add locale-independent date formatting and header fillingAccept CREATE requests and improve mailbox handling2 files
Document IMAP fixes and enhancements in changelogDocument IMAP fixes and enhancements in English changelogSummary by CodeRabbit
Bug Fixes
Security
Improvements