Coder Social home page Coder Social logo

joplin / plugin-email Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 364 KB

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.

TypeScript 83.72% JavaScript 16.19% CSS 0.09%
email email-plugin joplin joplin-plugin

plugin-email's People

Contributors

adeverteuil avatar bishoy-magdy avatar roman-r-m avatar wazam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plugin-email's Issues

No emails processed with newer versions of Joplin

I've been using this email plugin successfully for several months. Around version 2.12.19 of Joplin (I'm not exactly sure of the version), it stopped being able to process any emails from the selected folder. Authentication to the email server works fine.

In the logs, everything looks ok:
PluginService: "Loading plugin from /Users/dvreeman/.config/joplin-desktop/cache/Bishoy.EmailPlugin"
joplin.plugins: "Finished running onStart handler: Bishoy.EmailPlugin (Took 3289ms)"

However, there are a few issues in the Dev Tools Console output -- I can't determine their significance:

Screenshot 2024-01-01 at 6 45 08 PM

mbox format?

Hello,

This plugging seems very interesting, but...
All my emails are stored in box format, I haven't any xml file.
Is it planned to integrate this format?

Infinite 'joplin.data.get' loop when configuring the Email plugin

Hi,

I'm trying to configure the Email Plugin, but I think there is an infinite loop bug.

Email provider

I host my personal mailcow: dockerized mail server on DigitalOcean.

Steps to reproduce

  1. Open the Email plugin.
  2. Click "Manually connect to IMAP".
  3. Fill in the information.
    1. Email address.
    2. Password.
    3. Domain.
    4. Port 993.
    5. TLS enabled.
  4. Click LOGIN.

Problem conditions

The problem does NOT happen on an empty Joplin profile.

If I change to a new profile and configure the plugin, it successfully logs in and imports notes from the mailbox.

Then, if I import my notes from the .jex backup into the new profile, it continues working and importing notes from the mailbox.

But after importing my notes from the .jex backup, and try to logout and log back in with the Email plugin, the problem happens again.

So I don't know if the bug is in Joplin or in the Email plugin. It seems to only happen when there are notes and notebooks present at the time of logging in. But I'm not sure how to isolate the exact minimal conditions to reproduce the issue.

Negative testing

I tried with the wrong password, and I got a popup message saying "Error: Authentication failed."

The infinite loop doesn't happen in that case.

Logs

I enabled debug logs by following these instructions. Here is an extract of the output, starting at the first instance of the string "Email".

2023-06-06 13:54:24: PluginRunner: "Got message (3): joplin.views.panels.postMessage", "["plugin-view-Bishoy.EmailPlugin-panel","enableLoginScreen"]"
2023-06-06 13:54:24: UserWebview: "Got message", "postMessageService.plugin_message", "{"message":"enableLoginScreen"}"
2023-06-06 13:54:24: UserWebview: "Got message", "postMessageService.response", "{"message":{"responseId":"userWebview_16860812622680.20734508102333438","error":null}}"
2023-06-06 13:54:24: "ResourceService::indexNoteResources: Start"
2023-06-06 13:54:24: "ResourceService::indexNoteResources: Completed"
2023-06-06 13:54:24: "ResourceService::deleteOrphanResources:", "[]"
2023-06-06 13:54:25: PluginRunner: "Got message (3): joplin.views.panels.setHtml", "<hidden>"
2023-06-06 13:54:25: UserWebview: "Got message", "postMessageService.response", "{"message":{"responseId":"userWebview_16860812652820.8807690608651975","error":null}}"
2023-06-06 13:54:25: UserWebview: "Got message", "setHtml", "{"hash":"f99d236664e4e7f4a8ab425f23498b34","html":"<div class=\"container\">\n\n<div class=\"row\" style=\"font-size: large;\">\n\n  <div class=\"col-md-9 col-lg-7 col-xl-5 mx-auto\">\n\n  <div class=\"card border-0 shadow rounded-3 my-3 align-middle d-flex justify-content-center\" style=\"opacity: 0.97; top: 100px;\" >\n\n      <div class=\"card-body p-4 p-sm-5\">\n\n        <h1 class=\"card-title text-center mb-3 fw-light fs-1\">Login</h1>\n\n        <form action=\"\" onsubmit=\"loginManually(); return false\">\n          \n          <div class=\"form-floating mb-3\">\n            <input type=\"email\" class=\"form-control\" id=\"email\" placeholder=\"[email protected]\" required>\n            <label for=\"floatingInput\">Email address</label>\n          </div>\n          \n          <div class=\"form-floating mb-3\">\n            <input type=\"password\" class=\"form-control\" id=\"password\" placeholder=\"Password\" onclick = \"addBlockquote()\" required>\n            <label for=\"floatingPassword\">Password</label>\n          </div>\n\n          <div class=\"input-group\">\n            <span class=\"input-group-text\">Server</span>\n            <input type=\"text\" aria-label=\"First name\" class=\"form-control\" placeholder=\"imap.example.com\"\n              id=\"server\" required>\n          </div>\n\n        <br>\n\n        <div class=\"input-group\">\n          <span class=\"input-group-text\">PORT</span>\n          <input type=\"number\" aria-label=\"First name\" class=\"form-control\" placeholder=\"993\" min=\"1\" id=\"port\" required>\n        </div>\n\n        <br>\n\n        <div class=\"form-check\">\n          <input class=\"form-check-input\" type=\"checkbox\" value=\"\" id=\"ssl_tls\" checked>\n          <label class=\"form-check-label\" for=\"ssl_tls\">\n            SSL/TLS\n          </label>\n        </div>\n\n        <blockquote class=\"blockquote\">\n          <cite style = \"font-size: 15px;\" id = \"quote\"></cite>\n        </blockquote>\n\n          <div class=\"d-grid\">\n            <button id=\"login_btn\" class=\"btn btn-outline-primary btn-login text-uppercase fw-bold\" type=\"submit\" style=\"font-size:large;\">Login</button>\n          </div>\n\n        </form>\n\n        <br>\n\n        <div class=\"container\" style=\"text-align: center;\">\n          <button type=\"button\" class=\"btn btn-outline-info\" style=\"width: 75%; font-size: large;\"\n            onclick=\"loginScreen()\">Login Screen</button>\n        </div>\n\n        <hr class=\"my-4\">\n\n        <div class=\"container\" style=\"text-align: center;\">\n          <button type=\"button\" class=\"btn btn-outline-danger\" onclick=\"hide()\">Close</button>\n        </div>\n\n      </div>\n    </div>\n  </div>\n</div>\n</div>\n"}"
2023-06-06 13:54:40: UserWebview: "Got message", "postMessageService.response", "{"message":{"responseId":"userWebview_16860812806990.713801072367042","error":null}}"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","52beed25bcb54227972c77e7494fea90"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","93fc6e32a77b40cea499eacd8d1583e3"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","93fc6e32a77b40cea499eacd8d1583e3"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","52beed25bcb54227972c77e7494fea90"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","93fc6e32a77b40cea499eacd8d1583e3"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","52beed25bcb54227972c77e7494fea90"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","52beed25bcb54227972c77e7494fea90"]]"
2023-06-06 13:54:41: PluginRunner: "Got message (3): joplin.data.get", "[["folders","52beed25bcb54227972c77e7494fea90"]]"

This loop of joplin.data.get messages continues seemingly forever, at a rate of about 500 per second, and with repeating UIDs, until I stop the Joplin application.

In Dovecot logs, I see a successful login, but then nothing else until I close the Joplin application.

imap-login:  Login: user=<[REDACTED]>, method=PLAIN,  rip=[REDACTED], lip=[REDACTED], mpid=342267, TLS, TLSv1.3 with  cipher TLS_AES_256_GCM_SHA384 (256/256 bits)

imap([REDACTED])<343090><Zc37KXz9VKtiPIes>: Disconnected: Connection closed (IDLE running for 0.001 + waiting input for 1.925 secs, 2 B in + 10 B out, state=wait-input) in=90 out=1176 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

eml upload: No sender information in note

Hi again,

in the generated note the e-mail sender is missing. It would be great if this could be added in the generated note. In the upload preview the sender information is shown. I've attached 2 screenshots.

Possible solution which also would make the note look more "mail-ish" ;-)

Just add a block with some e-mail-metadata before the message body, e.g.

---
From: Margret Ludwig <[email protected]>
To: Beirat hausverwaltung <[email protected]>
Subject: Protokoll der letzten Sitzung
Date: 17. November 2022 um 16:40:21 MEZ
---

... here comes the message body, attachments, etc. ...

Maybe this could be activated/deactivated in the plugin preferences. Just some thoughts...

Best regards from Putzbrunn, Germany,
Christian
Bildschirmfoto 2022-11-18 um 21 31 51

Bildschirmfoto 2022-11-18 um 21 03 52

New release?

Hi, thanks for this very useful addon!

Would it be possible to get a new release to be able to use the features that have been added since the first version?

I tried to build a current version by myself, but after running npm run dist I got lost with the message Error: Unknown option '--joplin-plugin-config'. Help with this would also be appreciated.

Regards,
Martin

Manual login requiring an @ in the login name

My e-mail login with my provider is not the same as the e-mail address and does not contain an @ in so I am unable to use this to log in. Is it possible to remove the requirement for an @ in the login username for providers that issue a separate login rather than using an e-mail address?

Stuck on 'Loading'

Hi,
Just installed this from the current build. Created a new email account called [email protected], connect to it OK. Sent a test email to it OK. Activate the plugin by using the manual connect to IMAP option. Enter the username password and server details, 993, using TLS. All basically default. It connects, and from the log on the mail server I can see it authenticates just fine, but it goes no further. Just sits +idle. The client end is just stuck on 'loading'. I've removed and re-added it, and tried a few times. Always the same.

Any suggestions?

Plain text only email not importing

When sending plain text email via Python Scripts, the message imports however the body shows as folllows:

This Email Has No Body

Any and all attempts to correct this still show no contents.

Gmail Invalid Credentials

Hello, I created a new gmail account just for this purpose. I could not login through the plugin with standard or IMAP logins. I did activate IMAP for this email account, still no luck. I tried app password for both standard and IMAP logins as well. No luck.

Are there any workarounds for this, or are there other gmail settings I need to change??

Thanks!

activity display that is always visible

I quite like having the plugin to document mails occasionally. However, I constantly have an activity display that is always visible and gets on my nerves when I'm concentrating on my work. Please leave it out, no one who is already an adult probably needs it ;-) But a status string would be nice.

Attachments not being retrieved

Hi there I'm using Joplin & the Email plugin on macOS...

Joplin 2.11.11 (prod, darwin)
Sync Version: 3
Profile Version: 43
Keychain Supported: Yes
Revision: 6886f6f
Email Plugin: 1.0.0
macOS theme: 1.3.13
Publish to Web: 1.1.0

Email sent to the specific mailbox I've setup are being polled and received into Joplin as expected. Attachments to the email however - though they are listed and appear to be linked, do not reveal/open the PDF attachment - see attached.

Any reason/fixes I could try to get the attachments to appear?

Screenshot 2023-07-25 at 07 52 16

No email body when sent from various email clients

When the plugin grabs an email that has been sent from Thunderbird, the note that gets created says "This Email Has No Body" like in #14. I also get no email body

  • when I copy the email from my Inbox in the folder that the plugin has access to,
  • when I send the email using the webapp of my email provider (mailbox.org), or
  • when I send the mail from KMail.

However, it does work when I send the same email with Apple Mail.

It doesn't matter if the email has an attachment or not, or if it's html formatted or not.

Login not possible

Can not login ("Manually connect to IMAP"), the credentials are alright. Tryed another mail account without success.
Joplin 2.9.17 / Windows 10 (same issue on my notebook with windows 11)

eml-upload: Message body not in note

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

Add e-mail provider "Strato.de"

Hi,
in Germany "Strato.de" is one of the biggest e-mail (and homepage) provider. Could you add this please? I think it belongs into /src/core/emailProviders.ts

   {
        type: 'Strato',
        host: 'imap.strato.de',
        port: 993,
        tls: true,
   },

Thank's a lot,
Christian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.