Email Plugin

The timeline has been updated after discussion with the mentors and community.

Greetings Everyone :grinning: :wave:!

I'm Bishoy, an undergraduate student from Egypt. I'm excited to work through the summer on an Email Plugin :sun_with_face: :sun_with_face: :sun_with_face:.

Introduction

Most Joplin users are researchers or workers in different fields. It's usually the university or
company dealing with them via email, whether it's assignments, essays, reports, etc.
These users would surely want to add these important emails to their notes

As we see, there is a gap between the Joplin application and different email services,
but Joplin has a great and powerful plugin architecture, so we can close this gap by building a
plugin for many reasons:

  • Converts important emails in Joplin Notes without leaving the Joplin app.
  • Converts and manages a large number of messages to notes without any effort.
  • Exporting emails with different types [HTML, Markdown, Text].
  • It can attach all kinds of email attachments to Joplin notes.

Conclude this intro by proposing building a plugin that fetches emails from different email
services and converts them to Joplin Notes using the IMAP protocol.



Project Goals

  • Create a new plugin to convert emails from different email services to notes (including attachments) of different types, like Markdown, HTML, or Text.
  • The plugin can fetch all emails and monitor any new emails based on the 'from' attribute.
  • The plugin can fetch all emails and monitor any new emails based on specific mailboxes or folders.
  • Export the converted emails to a specific notebook location.
  • Can add more than one email account.


Timeline


Community Bonding (May 20 - June 12)


  • Discuss my Implementation and feedback on the UI of the plugin with my mentors and the community to see if there are any other enhancements or adjustments that can be made (It will be the second post).
  • install plugin setup and read previously installed plugin projects.

Coding Phase 1 (June 13 - July 24)

weeks 1 - 2

  • Initialize the plugin repository.
  • Create a new menu item into Tools.
  • Add the exportation types in settings.
  • Create a login screen (using view Panel).
  • Add close behavior to the panel.
  • Make weekly blog posts on the progress.

weeks 3 - 4

  • Write code for an IMAP connection.
  • Add predefined imap default configurations for some email services.
  • Add a capability feature. Determine the service type for the email user and configure their IMAP connection.
  • Add the manual connection screen.
  • Write unit tests for the plugin code written.
  • Make weekly blog posts on the progress.

weeks 5 - 6

  • Create the Main Screen
  • Fetching & monitoring based on 'from'.
  • Parsing email, extracting (HTML, Text, Attachments).
  • Post the converted emails to Joplin.
  • Write unit tests for the plugin code written.
  • Make weekly blog posts on the progress.

Coding Phase 2 (July 25 - Sept 4)

weeks 7 - 8

  • Add the feature that includes attachments to a note.
  • Add the feature that can convert emails to markdown.
  • Add a feature to locate the note based on the subject (for forward emails).
  • Add the feature of monitoring a specific mailbox or folder.
  • Add the feature of remove mailbox monitoring.
  • Write unit tests for the plugin code written.
  • Make weekly blog posts on the progress.

weeks 9 - 10

  • Add a popup window for Gmail on the login screen when clicking "Log in with Gmail."
  • Create a server-side for OAuth responses.
  • Make an OAuth connection and convert it to XOAuth.
  • Write unit tests for the plugin code written.
  • Make weekly blog posts on the progress.

weeks 11 - 12

  • Add a multi-user feature.
  • Any modifications or things postponed
  • Write unit tests for the plugin code written.
  • I will make a short video explaining how to use the plugin and Complete the readme in the repository.
  • Make weekly blog posts on the progress.

After GSoC

Since the time is limited, there are many things that I would like to add in the future
to the plugin, such as:

  • Remove Fwd, Fw, Tr, ..etc from subject (for the forward emails)
  • Convert the emails that β€˜To’, … etc
  • Messages that contain a specified string in the [Subject or body] field.
  • Convert the converted email to pdf and attach it to the Joplin notes.
  • The messages that are flagged as [NEW, SEEN, UNSEEN, DRAFT, ...]
  • and more …

Please feel free to make any recommendations or suggestions you have.

13 Likes

Thanks for working on this, @bishoy. Good luck!

1 Like

Hi,
I appreciate Your efforts, but two very helpful thunderbird addons are already doing the job (not as complete and sufficient as Your ambitions):

  1. Joplin-Export
  2. ImportExportTools NG
1 Like

HI @kai452 ,
As you see, these add-ons run only on Thunderbird.

So should a user who uses Joplin and wants to convert emails into notes use also Thunderbird?

The idea is to build a plugin that doesn't depend on a specific program like Thunderbird. In addition to the feature of monitoring a specific folder or mailbox without the need to select the message each time, and also the ability to convert emails to Markdown and other formats.

in addition, there are some changes and suggestions in the plugin during my discussion with mentors and the community, and I will update this post soon with changes.

I hope the answer is clear :grin:

4 Likes

I think it's a great idea !

It make me think about RSS...

Keep going !

1 Like

The post has been updated :smiley:

2 Likes

Great I love the "hide details"

1 Like