Email Plugin Implementation & UI

there is but we don't want to integrate an email server into it.
I could imagine that someone will modify the docker-compose file to add an email server

I meant central in the sense that every user must connect to it, as it is the case with Evernote (as far as I know)

yes, I think that editing the subject (forward) will be enough because I already have a copy of the subject of the original emails like this:
screenshot

1 Like

well, I will edit the timeline and intend to do manual fetching in the future.

I'm grateful for your help and suggestions, Thank you. :smiling_face_with_three_hearts:

But I worry about archiving emails because they go to the All Email not the specific mailbox and I think it is difficult to convert the huge number of emails that will be in All Email :sweat_smile:.

Anyway, after the user connects to IMAP, the plugin will allow the user to choose what mailbox, folder, or tag they want to be monitored and converted into notes.

I thought especially in the case of use mentioned above where the user would use an email box dedicated to Joplin (therefore empty at the start) and would only transfer the messages he wants to find in Joplin in the form of notes (" archives ") or tasks (" todo ")

2 Likes

And if no argument is specified the title the note would be empty ?

1 Like

exactly, and my personal opinion is that this idea is both organized and very simple for the user, especially if an email contains a lot of messages and is not organized.

Not exactly, by default the subject of the forwarded message is the same as the subject of the original prefixed with the word Fwd like:
Fwd: the subject of the original email @Note #tag

And if the user is forced not to have anything in its subject in a forwarded email, Joplin, by default, takes the first line of note and takes it as the title.

Okay. Besides, it makes me think that it is not always very useful to have the mention of the transfer in each email ("Fw", "Fwd", "Tr", etc)

It would surely be interesting to allow a "trim" option ? Regular expression could help in this case.

image

Trim subject with regular expression like :

^(((Re|Fw|Fwd|TR|Tr):|(\[.*\])) ?)*

The thunderbird addon works like this.

2 Likes

But I think it will be difficult for the user to use regular expressions. I think using things like @NoteName or #tag will be enough and Simply after sending the email, it will be the newest email received.

@bepolymathe Thank you for these pretty notes and suggestions. :smiling_face_with_three_hearts:

1 Like

Then they just won't use them, not a problem. Just put some meaningful defaults there as @bepolymathe suggested and it will (almost) never need to be changed.

Maybe one exception is if the user's email client is in another language, and uses some equivalent of re/fwd/etc in that other language. Then they might want to change/extend that regex.

Or, instead of regular expressions it may be enough to specify prefixes. It's not like you can have "re" or "fwd" added in the middle of the subject (at least I hope not!). Although I'm not sure if this would work with RTL languages like Arabic. That you should know better than I do.

3 Likes

I tested it on a number of languages, including Arabic, and 'Fwd:' is standard for all languages in Gmail, AOL. and 'Fw:' for Outlook, Yahoo

IMAP log in Arabic subject example:

(#1860) Parsed header: {
  date: [ 'Fri, 3 Jun 2022 12:01:00 +0200' ],
  subject: [ 'Fwd: اللغة العربية @ملاحظة #علامة' ],
  from: [ 'Bishoy Magdy <bishoy.magdy.adeeb@gmail.com>' ],
  to: [ 'Bishoy Magdy <bishoy.magdy.adeeb@gmail.com>' ]
}

This means that, whatever the language, the prefix of the subject is Fwd: or Fw:

I thought about that too, It is not only an Fwd or Fw check, and it must also be preceded by a colon ":" , Fwd:

I have another solution. You can search in the email after parsing for the first line that has the "Subject:"


When I use OAuth, the Google API gives me a client secret, which is a secret used by the OAuth Client to authenticate to the Authorization Server. The Client Secret is a secret known only to the OAuth Client and the Authorization Server, and I use the client's secret when posting a request to get an access token.
So is there any way to hide the client's secret in the Joplin plugin?

:thinking: For me it’s always "Tr" "tr" with my professionnal account (like "transfert")

3 Likes

hmmmmmmmmmm :thinking::thinking:
I think this happened because your Gmail or email provider is itself is french or whatever language not only the content of the email.

I don't think there is a general solution to this problem and Evernote itself leaves email itself without any modification.

What do you think of this other solution?

Why don't you do the same, at least initially, and not spend too much time on this relatively minor thing.

Check how it stores other secrets, like WebDAV password or Dropbox token.

1 Like

The post has been updated :grinning: