Releases: callzhang/n8n-nodes-imap
Releases · callzhang/n8n-nodes-imap
Release 2.15.3: Critical Bug Fix - Mailbox Encoding Issue
Critical Bug Fix
- Fixed Mailbox Encoding Issue: Resolved "SELECT failed" and "COPY failed" errors when moving emails to Chinese mailboxes
- UTF-7 Encoding Handling: Added proper decoding for UTF-7 encoded mailbox names like
&V4NXPpCuTvY- - Known Encoding Mapping: Implemented mapping for known problematic encodings to correct mailbox names
- Move Operation Fix: Move operation now works correctly with Chinese mailbox names
Technical Details
- Root Cause: n8n was passing UTF-7 encoded mailbox names (
&V4NXPpCuTvY-) instead of actual names (垃圾邮件) - Solution: Added
decodeMailboxPathfunction with known encoding mappings and UTF-7 fallback - Error Prevention: Prevents "SELECT failed" and "COPY failed" errors when using Chinese mailboxes
- Backward Compatibility: Normal mailbox names (INBOX, etc.) continue to work without changes
Release 2.15.2: Critical Bug Fix - Reverted Move Operation Changes
Critical Bug Fix
- Reverted Move Operation Changes: Restored the "Source Mailbox" parameter in Move operation
- Fixed n8n Context Issue: Corrected the misunderstanding about n8n node execution context
- Proper IMAP Implementation: Each n8n operation is stateless and requires explicit mailbox specification
- Reliable Operation: Move operation now works correctly in n8n workflows
Technical Details
- n8n Architecture Understanding: n8n operations are executed independently without persistent context
- IMAP Session Management: Each operation creates its own IMAP session and must specify source mailbox
- Parameter Restoration: Restored the original 3-parameter structure (Source Mailbox + Email UID + Destination Mailbox)
- Error Prevention: Prevents runtime failures that would occur with the context-dependent approach
Release 2.15.1: UX Improvement - Simplified Move Operation
UX Improvement
- Simplified Move Operation: Removed redundant "Source Mailbox" parameter from Move operation
- Smart Context Detection: Move operation now automatically uses the current mailbox context as the source
- Cleaner Interface: Reduced from 3 parameters to 2 parameters (Email UID + Destination Mailbox)
- Better User Experience: Users no longer need to specify the source mailbox when moving emails
Technical Improvements
- Current Mailbox Context: Leverages imapflow's current mailbox context (
client.mailbox.path) - Type Safety: Added proper TypeScript handling for mailbox object types
- Fallback Logic: Graceful fallback to 'INBOX' if no current mailbox context is available
- Consistent Behavior: Move operation now works seamlessly with the current mailbox selection
Release 2.15.0: Unified Mailbox Selection
Major UX Improvement
- Unified Mailbox Selection: Combined three separate mailbox controls into one clean multiple selection field
- Simplified Interface: Replaced single mailbox selector, multiple mailboxes field, and "Search All Mailboxes" checkbox with one unified control
- Default "ALL" Selection: "ALL" is now the default option, making it easy to search across all mailboxes
- Flexible Selection: Users can select "ALL" or choose specific mailboxes, or combine both approaches
Technical Improvements
- Cleaner Parameter Structure: Reduced parameter complexity from 3 separate controls to 1 unified control
- Better User Experience: More intuitive interface with clear descriptions and default behavior
- Consistent Behavior: Both "Get Many" and "Get Single Email" operations now use the same unified mailbox selection
- Dynamic Options: Mailbox options are loaded dynamically from the server with "ALL" option at the top
Breaking Changes
- Parameter Names Changed:
mailboxPath(single) +multipleMailboxes(array) +searchAllMailboxes(boolean) →mailboxes(array)- Default value is now
['ALL']instead of separate controls
- Migration: Existing workflows will need to be updated to use the new unified
mailboxesparameter
Release 2.14.0: Multiple Mailbox Support
Multiple Mailbox Support
- Multiple Mailbox Selection: Enhanced mailbox parameter to support selecting multiple mailboxes simultaneously
- ALL Mailboxes Option: Empty mailbox selection now defaults to searching ALL available mailboxes
- Multi-Selection UI: Updated mailbox parameter to use multiOptions for better user experience
- Mailbox Path in Output: Email results now include the source mailbox path for better tracking and organization
Enhanced Operations
- EmailGetList Operation: Now iterates through multiple mailboxes and aggregates results with proper limit handling
- EmailGetSingle Operation: Can search for specific UID across multiple mailboxes until found
- Improved Error Handling: Graceful fallbacks when individual mailboxes fail to open or search
- Better Logging: Enhanced logging to show which mailboxes are being searched and results per mailbox
Technical Improvements
- New Functions: Added
getMailboxPathsFromNodeParameter()andgetAllMailboxes()for multi-mailbox support - Enhanced Validation: Added
ParameterValidator.validateMailboxes()method for multi-mailbox validation - Dynamic Loading: Updated mailbox parameter to use
loadOptionsMethodfor dynamic mailbox list loading - Performance Optimization: Efficient iteration through mailboxes with early termination on limit reached
Breaking Changes
- Mailbox Parameter: Changed from single selection to multi-selection (multiOptions)
- Default Behavior: Empty mailbox selection now searches ALL mailboxes instead of defaulting to INBOX
- Output Format: Email results now include
mailboxPathfield indicating the source mailbox
Migration Guide
- Existing Workflows: Update mailbox selection to explicitly choose INBOX if you want the previous single-mailbox behavior
- New Workflows: Leave mailbox selection empty to search all mailboxes, or select specific mailboxes as needed
- Output Processing: Update any downstream nodes that process email results to handle the new
mailboxPathfield
Release 2.13.0: Unified Message Parts System
Major Refactor: Unified Message Parts System
- Removed "Include Body" Parameter: Eliminated the separate "Include Body" parameter that was duplicating functionality
- Enhanced Message Parts: Added "Markdown Content" option to the existing "Include Message Parts" dropdown
- Unified Content Processing: All content types (text, HTML, markdown) now use the same efficient processing pipeline
- Cleaner Interface: Simplified the user interface by consolidating content options into a single, intuitive dropdown
- Better Performance: Optimized content fetching by reusing the existing message parts infrastructure
- Consistent Behavior: Both "Get Many" and "Get Single Email" operations now use the same message parts system
Technical Improvements
- Refactored EmailGetList.ts to use existing Message Parts instead of separate Include Body logic
- Refactored EmailGetSingle.ts to use the same Message Parts system for consistency
- Added MarkdownContent to EmailParts enum across both operations
- Integrated markdown generation into existing message parts processing
- Removed redundant parameters and simplified the codebase
- Maintained all existing functionality while improving code organization
Breaking Changes
- "Include Body" parameter removed: Users should now use "Include Message Parts" dropdown instead
- Default behavior: Text Content, HTML Content, and Markdown Content are now selected by default in "Get Single Email"
- Field names: Content fields are now named
textContent,htmlContent, andmarkdownContent(instead oftext,html,markdown)