Failed Email Extractor is a specialized Thunderbird MailExtension designed for ad operations and email marketing professionals. It simplifies the process of managing email bounces by extracting unique recipient addresses from non-delivery reports (NDRs) directly within the Thunderbird interface.
- Automated Extraction: Scans selected messages for failed recipient headers including
X-Failed-Recipients,Final-Recipient, andOriginal-Recipient. - Deep Parsing: Detects recipient addresses within embedded
message/rfc822parts of delivery status notifications. - Smart Filtering: Automatically converts addresses to lowercase, removes duplicates, and sorts them alphabetically.
- Clipboard Integration: Copies the final list of unique emails directly to the system clipboard for easy export to Google Sheets or other tools.
- Integrated Debug Console: Features a hidden, built-in execution log (toggleable via UI) to track extraction steps, monitor API responses, and troubleshoot edge cases without needing external developer tools.
To use this extension without installing it from the official store:
- Open Thunderbird and go to Tools > Add-ons and Themes.
- Click the Gear icon and select Debug Add-ons.
- Click Load Temporary Add-on....
- Select the
manifest.jsonfile from your project folder.
- Select one or more non-delivery reports in your Thunderbird message list.
- Click the Failed Email Extractor icon in the toolbar.
- In the popup, click the "Extract Unique Emails" button.
- The list of extracted addresses will be automatically copied to your clipboard.
- (Optional) Click the (bug) icon in the popup to reveal the developer console and view real-time processing logs.
1. Development Environment
- Language: Vanilla JavaScript (ES6+), HTML5, CSS3.
- API: Thunderbird MailExtension (WebExtension) API.
- Build Tools: No transpilers, minifiers, or machine-generation tools were used. All code is clean, heavily commented, and human-readable.
2. Architecture Notes
- API Workaround: The extraction pipeline utilizes
browser.tabs.query(withactiveTabpermission) instead ofbrowser.mailTabs.query. This is an intentional architectural decision to bypass a known Thunderbird bug where complex thread layouts causemailTabs.queryto throw an unexpected error.
3. File Structure
/
├── manifest.json # Extension metadata and permissions
├── icon.png # Extension icon (48x48 / 128x128)
├── README.md # Project documentation
└── mainPopup/
├── popup.html # Popup interface with hidden debug console
└── popup.js # Extraction, parsing logic, and logging pipeline