luksan47 / mars

Eötvös Collegium's Unified IT System
MIT License
4 stars 16 forks source link

Do not send multiple emails #609

Closed kdmnk closed 3 years ago

kdmnk commented 3 years ago

Now the system loops through certain roles and sends emails to the users with those roles. If I have multiple roles, there are situations that I get multiple emails of the same content. Try to find a solution for this.

luksan47 commented 3 years ago

bcc? :)

kdmnk commented 3 years ago

I mean if I have secretariat and admin role at the same time, I receive two emails separately if a new user has been registered.


From: Norbert Luksa @.> Sent: Friday, October 1, 2021 1:26:32 PM To: luksan47/mars @.> Cc: Katkó Dominik @.>; Author @.> Subject: Re: [luksan47/mars] Do not send multiple emails (#609)

bcc? :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/luksan47/mars/issues/609#issuecomment-932146578, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANMZKML2IPSYPYMWTDAS6Y3UEWLGRANCNFSM5FEEY3GQ.

luksan47 commented 3 years ago

Yeah, instead of looping through the users and sending them each a mail, let's just collect the users in a bcc list and send at once.

luksan47 commented 3 years ago

I think I can work on it this week.

kdmnk commented 3 years ago

Yeah, instead of looping through the users and sending them each a mail, let's just collect the users in a bcc list and send at once.

Oh, right, thats better

luksan47 commented 3 years ago

This is not an issue on the uran-2.x branch. However I checked a few things:

The violation of the above two is ill-advised and can cause a lot of trouble (like this). I strongly suggest not developing anything on the server, but if something goes in, it should be pushed to master first, and then merged to uran-2.x.

luksan47 commented 3 years ago

Now that I see it's updated, I'll create a quick fix.