website icon indicating copy to clipboard operation
website copied to clipboard

MailtoDropdown: Support for more webmailers

Open baltpeter opened this issue 4 years ago • 16 comments

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.

baltpeter avatar Sep 19 '20 08:09 baltpeter

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

haardikdharma10 avatar Oct 01 '20 16:10 haardikdharma10

@haardikdharma10 Sure, go ahead!

baltpeter avatar Oct 01 '20 17:10 baltpeter

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

galanggg avatar Oct 02 '20 00:10 galanggg

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 avatar Oct 02 '20 01:10 swapniljha001

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

swapniljha001 avatar Oct 02 '20 01:10 swapniljha001

@swapniljha001 @baltpeter heres my PR for Outlook #416

galanggg avatar Oct 02 '20 01:10 galanggg

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.

baltpeter avatar Oct 02 '20 09:10 baltpeter

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? 🤔

haardikdharma10 avatar Oct 02 '20 09:10 haardikdharma10

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

baltpeter avatar Oct 02 '20 10:10 baltpeter

Yeah that's what :(

haardikdharma10 avatar Oct 02 '20 10:10 haardikdharma10

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?

davenewham avatar Oct 06 '20 20:10 davenewham

@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 avatar Oct 07 '20 15:10 baltpeter

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

baltpeter avatar Oct 31 '20 11:10 baltpeter

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/.

baltpeter avatar Oct 06 '22 08:10 baltpeter

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

mal-tee avatar Oct 06 '22 09:10 mal-tee

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.

baltpeter avatar Oct 06 '22 09:10 baltpeter