Email message import from Outlook / Thunderbird and other MUAs into Logseq

It would be great if Logseq could import emails from Outlook, Thunderbird, and other MUAs.
This would make it possible to capture email content in Logseq.

I suggest to add a command “/email”, which takes a link to a .msg/.eml file and turns it into a Logseq block, such that it can be linked to etc.

Logseq should also be a drop target for email messages, this will allow to conveniently drag messages onto a Logseq page, triggering the import command.

Messages should be physically imported into Logseq instead of just linking to be able to edit the messages in Logseq, but also to have a permanent copy of the message.

To import a message is:

  • converted into a logseq block
  • multiple parts (email chain) are split into multiple blocks, each get their own little header properties for From/To/Sent etc.
    • This allows to search for emails in Logseq and to link to individual parts of messages
  • the original email file is linked
    • this provides Logseq → MUA integration (klicking on the file will open the MUA, which allows to edit/forward etc. the message)
  • attachments are extracted and also linked
  • If possible, HTML bodies are converted to Markdown, if the formatting is too complex (tables, colors, etc.) they are included as html
  • Images are converted to Markdown image links (or in HTML bodies for more complex formatting)

This is how an imported email message could look like:

  • RE: Logseq Email Integration

    Link to original message file
    Attachments : attachment1.pdf, attachment2.pdf
    • From: user
      Sent: Monday, September 19, 2022 12:01 PM
      To: gax
      Subject: Logseq Email Integration

      Can we drag/drop email messages into Logseq?
      some image shown here

    • From: gax
      Sent: Sunday, September 18, 2022 12:01 PM
      To: user
      Subject: Logseq Email Integration

      Would be nice to copy message files into Logseq.

    • From: user
      Sent: Saturday, September 17, 2022 12:01 PM
      To: gax
      Subject: Logseq Email Integration

      How to integrate Logseq and Email?