datenanfragen / website

The Datenanfragen.de website including the request PDF generator and company information database
https://www.datenanfragen.de
MIT License
95 stars 125 forks source link

MailtoDropdown: Support for more webmailers #402

Open baltpeter opened 4 years ago

baltpeter commented 4 years ago

Our MailtoDropdown doesn't just support the regular mailto: URI scheme but also various webmailers (currently Gmail and Yahoo):

Peek 2020-09-19 10-02

We would like to extend this with support for more webmailers, especially local ones like GMX and Web.de in Germany.

The handlers are implemented here:

https://github.com/datenanfragen/website/blob/6d6fa4b7bda928fd9671654f604ab8b672ba694e/src/Components/MailtoDropdown.js#L15-L100

Adding support for a new one is easy once you have found the correct URL.

haardikdharma10 commented 4 years ago

Hi @baltpeter, I'd like to trigger this and add GMX and Web.de. Can I go ahead?

baltpeter commented 4 years ago

@haardikdharma10 Sure, go ahead!

galanggg commented 4 years ago

hello @baltpeter can i send a PR for link of Outlook ?

swapniljha001 commented 4 years ago

hello @baltpeter can i send a PR for link of Outlook ?

@galanggg The Outlook wasn't working previously, but the reference material is 4 years old, so you might need to research some more before adding the Outlook link.

     // TODO: Outlook doesn't work. I think our body may be too long. :( 
     // Reference: https://blogs.msdn.microsoft.com/carloshm/2016/01/16/how-to-compose-a-new-message-or-event-and-populate-fields-in-office365/ 
     // outlook: { 
     //     link: d => 
     //         `https://outlook.live.com/owa/?path=/mail/action/compose&to=${d.email}&subject=${d.subject}&body=${d.body}`, 
     //     countries: ['all'] 
     // }, 
swapniljha001 commented 4 years ago

What other web mailers are needed here? I think the most common ones like Google, Yahoo, Yandex have already been added to this.

galanggg commented 4 years ago

@swapniljha001 @baltpeter heres my PR for Outlook #416

baltpeter commented 4 years ago

What other web mailers are needed here? I think the most common ones like Google, Yahoo, Yandex have already been added to this.

I agree that we now support the most common ones. The purpose behind this issue is explicitly to catch those that we have missed, so I cannot tell you which ones to add. :) I think the most potential is in adding local webmailers that are specific to one EU country. As I am from Germany, I only know the German ones (GMX and Web.de for example, as I mentioned) and no the ones for other countries.

haardikdharma10 commented 4 years ago

Hi @baltpeter, I tried searching for the correct url for GMX, but as I am from India I am unable to sign up for GMX. Also, the discussion about the correct compose url for GMX is here: https://github.com/Noitidart/MailtoWebmails/issues/12 Let me know what do you think? 🤔

baltpeter commented 4 years ago

@haardikdharma10 Seems like they didn't find a working link in the issue you linked. :/

haardikdharma10 commented 4 years ago

Yeah that's what :(

davenewham commented 4 years ago

Regarding this, from a quick test, URI's are limited to roughly 8200 chars from Gmail (in Firefox) for a GET combined with the fact that older browsers are even limited more to just 2048 chars... is there not a better solution than using the URI?

baltpeter commented 4 years ago

@davenewham That's a good point! I didn't consider URL length limitations in browsers. According to this very old post, this shouldn't be a problem in browsers other than IE. This StackOverflow answer lists some additional concerns but since we don't have to care about SEO and CDNs in this particular case, I would conclude that this shouldn't be an issue for us.

is there not a better solution than using the URI?

To be honest, there wasn't exactly a whole lot of planning behind this feature. I just saw something similar on another site and decided it would be nice to implement that on Datenanfragen.de as well. Personally, I am not aware of any other methods that webmailers support of transmitting the message metadata and body. But if you or anyone else is, we can definitely implement that. The handler implementation is very dynamic, so it shouldn't be an issue to retrofit that into the existing code.

baltpeter commented 4 years ago

@privateOmega tried to implement support for AOL in #473. Unfortunately, they don't seem to respect line breaks in the body.

baltpeter commented 2 years ago

Found a new one that is probably even quite popular with our users:

`https://mail.proton.me/u/0/inbox#mailto=mailto%3A${(to)}%3Fsubject%3D${encodeURIComponent(subject)}%26body%3D${encodeURIComponent(body)}`

From https://notmyplate.com/.

mal-tee commented 2 years ago

We could consider moving this functionality into a lib :thinking: I guess this would be useful for other people as well.

baltpeter commented 2 years ago

Interesting idea, but I feel like the handful of webmailers we support so far doesn't really justify that yet.

Maybe a blog post would be more useful? So far at least, they are all just URL patterns anyway.