andreas13xxx287 downloadsImport emails from an IMAP mailbox into your Obsidian vault as Markdown notes with attachments.
An Obsidian plugin that imports emails from an IMAP mailbox into your vault as Markdown notes. Unread emails are fetched, converted to Markdown with YAML frontmatter, and saved alongside their attachments.
To make the installation as easy as possible use the BRAT Plugin.
main.js, manifest.json, and styles.css from the latest release.<YourVault>/.obsidian/plugins/obsidian-mail-importer/Open Settings → Community plugins → Email Importer to configure the plugin.
| Setting | Description | Default |
|---|---|---|
| Host | IMAP server hostname | (empty) |
| Port | IMAP server port | 993 |
| Security | SSL/TLS (port 993) or STARTTLS (port 143) |
SSL/TLS |
| Username | Your email account username | (empty) |
| Password | Your email account password | (empty) |
| Setting | Description | Default |
|---|---|---|
| Folder | IMAP folder to monitor | INBOX |
| Setting | Description | Default |
|---|---|---|
| Vault folder | Folder in your vault where emails are saved | Emails |
| Interval | Auto-sync interval in minutes (0 = manual only) |
0 |
Use the Test connection button to verify your IMAP settings. Use Sync now to trigger an immediate import.
Ctrl/Cmd + P) and run Email Importer: Sync nowSet the sync interval to a value greater than 0 in the plugin settings. The plugin will check for new emails at that interval (in minutes).
If an email fails to import, it remains unread and will be retried on the next sync.
Each imported email is saved as a Markdown file with the following structure:
YYYY-MM-DD HH-mm <Subject>.md
Special characters in the subject (/ \ : * ? " < > |) are replaced with -. If a file with the same name already exists, a counter is appended: (2), (3), etc.
---
date: 2025-05-10T09:15:00+02:00
from: [email protected]
to: [email protected]
cc: ""
subject: Invoice May 2025
messageId: <[email protected]>
attachments:
- invoice.pdf
- logo.png
---
The HTML body is converted to Markdown. Inline images are embedded as . File attachments are listed at the end as Obsidian wiki-links: [[path]].
Attachments are stored in:
<ImportFolder>/attachments/<email-filename>/
⚠️ Password is stored in plaintext. Your IMAP password is saved unencrypted in Obsidian's data.json file within the plugin folder. This is a known limitation. Take appropriate precautions:
.obsidian/plugins/obsidian-mail-importer/data.json file to untrusted locations.The plugin disables IMAP client logging to prevent credentials from appearing in console output.
| Issue | Solution |
|---|---|
| Connection timeout | Verify host/port are correct. The plugin has a fixed 30-second timeout. Check firewall settings. |
| No emails imported | Ensure there are unread emails in the configured mailbox folder. |
| Plugin not loading | Confirm main.js and manifest.json are in the plugin folder. Restart Obsidian. |
| Sync button does nothing | A sync may already be in progress. Wait for it to complete. |
| Garbled text | The plugin handles standard MIME encodings. Severely malformed emails may not parse correctly. |