the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
994 stars 120 forks source link

For Nextcloud -- accept input from Contacts app #1635

Closed BiglifeMatt closed 2 months ago

BiglifeMatt commented 3 months ago

Is your feature request related to a problem? Please describe. In the Contacts app there are options next to groups for Send Mail or Send Mail as BCC. With the native Mail app as the mailto default, this selection would open a new Compose window with all of the email addresses from the group in the TO field, or BCC, depending on the selection.

Describe the solution you'd like I would like to have this result in the SnappyMail app. Right now it will open a compose window in SnappyMail but the TO or BCC fields are empty.

Describe alternatives you've considered Only alternative is to use the native Mail App for this function.

the-djmaze commented 3 months ago

It works here, but my browser has a standalone SnappyMail registered. So when i click on "send mail" it opens the browser select app screen.

afbeelding

I've modified the code a bit to log the protocol registration to see if it tries to register.

BiglifeMatt commented 3 months ago

Ok, I figured something out... I have a lot of imported contacts.  They do not have a Type for their Email field.  Some have a generic like INTERNET.  If I change their attribute name to Home, Work, or Other in the Contact data, then they come over when you use the Send Mail or BCC option.  Not sure if there is a way to allow the Type to be anything, or if I would need to have all import data aligned to these options.

June 17, 2024 at 9:01 AM, "Maarten" @.***> wrote:

It works here, but my browser has a standalone SnappyMail registered.

So when i click on "send mail" it opens the browser select app screen.

afbeelding.png (view on web) https://github.com/the-djmaze/snappymail/assets/3752035/732c1b7f-f05e-4c7c-b846-701879987c4f

Reply to this email directly, view it on GitHub https://github.com/the-djmaze/snappymail/issues/1635#issuecomment-2173340770 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGSHRUP7YIYABQKD4DYAVLZH3M2RAVCNFSM6AAAAABJKYVLRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGM2DANZXGA .

You are receiving this because you authored the thread.

Matt Coulter Director of Technology @.*** (o) 706-940-5113**

BiglifeMatt commented 3 months ago

I figured out how to update the data for the imported users to give them a proper title for the email types. Now however, it would appear that there is an issue where the Send Email option from Contacts is limited for groups larger than 40. I'm not sure if the limit is on the Nextcloud Contacts side, or on the SnappyMail side.

BiglifeMatt commented 2 months ago

Does this mean you were able to test or determine if a group limit of 40 recipients is an issue or if it shouldn't matter on your end? I'm just still trying to figure out where the problem lies. Thanks.

the-djmaze commented 2 months ago

afbeelding

"Send email as BCC" afbeelding

So it works here.

The limit of recipients depends on the server and configuration. Mostly the max is 50

BiglifeMatt commented 2 months ago

Yes. I get that too. But if I try a group larger than 40 people they do not come over.

On July 8, 2024 9:30:08 AM EDT, Maarten @.***> wrote:

afbeelding

"Send email as BCC" afbeelding

So it works here.

-- Reply to this email directly or view it on GitHub: https://github.com/the-djmaze/snappymail/issues/1635#issuecomment-2214083344 You are receiving this because you authored the thread.

Message ID: @.***> Matt Coulter IT Director Biglife International

the-djmaze commented 2 months ago

A URL was max 2000 characters. These days it is mostly 8190.

And there's Apache around the corner with https://httpd.apache.org/docs/current/mod/core.html#limitrequestline

An email address is mostly around 40 characters (like John Doe <johndoe1970@example.com>) so it should roughly can handle 200 addresses.

Maybe Nextcloud uses the max 2000 characters and limits the URL to max 40/50 addresses?

Best way might be to look in the Apache requests logs for the URL query

BiglifeMatt commented 2 months ago

So, if I understand you correctly,

1) it passes all of that data in a URL format to the mail app

2) that would be more likely a limit coming from the contacts app

Is this correct?

July 8, 2024 at 12:35 PM, "Maarten" @.***> wrote:

A URL was max 2000 characters. These days it is mostly 8190.

And there's Apache around the corner with https://httpd.apache.org/docs/current/mod/core.html#limitrequestline

An email address is mostly around 40 characters (like John Doe @.***>) so it should roughly can handle 200 addresses.

Maybe Nextcloud uses the max 2000 characters and limits the URL to max 40/50 addresses?

— Reply to this email directly, view it on GitHub https://github.com/the-djmaze/snappymail/issues/1635#issuecomment-2214641579 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGSHRXHDBCVGENX33N4TUDZLK5VJAVCNFSM6AAAAABJKYVLRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUGY2DCNJXHE . You are receiving this because you authored the thread.

Matt Coulter Director of Technology @.*** (o) 706-940-5113**

the-djmaze commented 2 months ago

The limit could be the contacts app, but i have no idea. This should be investigated.

BiglifeMatt commented 2 months ago

Ok, here is another way I should be able to use this but it doesn't work.  Is there something that can be done in SnappyMail to read the Contact Groups I create in Nextcloud?  I notice if I type the name of a group is does not resolve from there.  But if it did, I was thinking that would work in pulling the recipients over.  Is this possible to develop?

July 9, 2024 at 3:23 AM, "Maarten" @.***> wrote:

The limit could be the contacts app, but i have no idea. This should be investigated.

— Reply to this email directly, view it on GitHub https://github.com/the-djmaze/snappymail/issues/1635#issuecomment-2216800186 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGSHRRHFLZ4SGNDK4I33VTZLOFV3AVCNFSM6AAAAABJKYVLRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJWHAYDAMJYGY . You are receiving this because you authored the thread.

Matt Coulter Director of Technology @.*** (o) 706-940-5113**