joplin / plugin-email

This plugin adds the ability to fetch email messages and converts them to Joplin notes in various formats, either by monitoring any new or unread messages from a specific email address or a specific mailbox, or by uploading downloaded email messages to the plugin without having to be logged in.
29 stars 4 forks source link

eml-upload: Message body not in note #14

Open charraeus opened 1 year ago

charraeus commented 1 year ago

Hi - it's me again :-),

I've imported an eml file via "eml upload". In the generated note the message body has disappeared. See screen shot. I tested with all three options "html", "text" and "markup".

If you need the eml file I could send it to you, but I don't want to put it on this public webpage.

OS: Mac OS 12.5.1 Mail Client: Apple Mail

Best regards, Christian

Bildschirmfoto 2022-11-18 um 21 03 52
bishoy-magdy commented 1 year ago

Hmmm 🤔,TBH I don't have apple mail to test this problem, so I need an eml apple file example to figure out the problem. You can upload the eml file to Drive with an email access request and of course, the e-mail that you will follow does not contain sensitive data😂.

charraeus commented 1 year ago

Find the eml file here: https://harraeus.de/austausch/Protokoll-der-letzten-Sitzung.eml. In the file I

Best regards

bishoy-magdy commented 1 year ago

Find the eml file here: https://harraeus.de/austausch/Protokoll-der-letzten-Sitzung.eml. In the file I

  • removed the base64 code of the attachment
  • changed all e-mail addresses
  • changed all ip addresses
  • checked if the eml file still could be opened by Apple mail --> positive

Best regards

Yes, the file works well, thank you for your cooperation❤️.

I created a PR to fix this issue. The issue is that most email providers use HTML as the primary format for email content presentation, even if the email content is just plain text; the email parser will return both the HTML and the plain text, but it will not always email parser parse the plain text well, which is why I rely on the HTML email format. 

In the Apple Mail provider, if email content contains only plain text, it will return only the plain text attribute, not the HTML (undefined).

After Fix

Text Format

Markdown Format 2

HTML Format 3