Think about a way to reduce the amount of emails
We are currently sending 25000 emails a day - and are reaching the limits of the current sending system via our little nice greensta account.
This Issue is beeing discussed in the Thread https://yunity.slack.com/archives/C02TVAHDMBR/p1649154223346789
My plans would be:
Short term (1-2 months): Introduce more settings for finer grained control for the users
mid term(3-6 months): Introduce a batching feature
mid-long-term: Additionally switch to a transactional email service for better bounce management and reliability.
Local satellite mailer queue: https://banana-admin.lebensmittelretten.de/munin/lebensmittelretten.de/banana.lebensmittelretten.de/postfix_mailqueue.html
Mail throughput: https://dragonfruit-admin.foodsharing.network/munin/foodsharing.network/dragonfruit.foodsharing.network/postfix_mailstats.html
mail types:
-
login/register mails (very important)
- password reset mails
- join emails
- on changing mail
-
newsletter (can be unsubscribe from)
-
Around 336 - 557 nightly no-fetcher warning message for store managers per day #232 (closed) & #648 (closed) (might be often for organizational stores?)
-
chat mails (if user is not logged in with a timeout of ?5-10? minutes)
- manually created groups (very rare)
- store teams (many unnecessary messages, but looking for a replacement is very important)
- private (pretty important)
-
forum mails
- one mail per new topic: !1160 (merged) !1233 (merged) (very unnecessary)
- subscribed ones (can be unsubscribe from)(important, but would be great if only opt-in)
-
workgroup mails (currently the only notification for applications) (seems to be .network mails)
- application mails (if someone applies for workgroup)
- mails send to workgroup on apply
Functions that send mails
Mails send with tlpMail
-
Modules/Legal/LegalControl.php
- in function index(): If form is submitted and valid, 'user/privacy_notice' is send to the user
-
Modules/Login/LoginGateway.php
- in function addPassRequest() : 'user/reset_password' mail is send
-
Modules/Login/LoginXhr.php
- in function joinsubmit(): 'user/join' mail is send on execution of registration process
-
Modules/Mails/MailsControl.php
- in mailboxupdate() : sends a 'general/invalid_email_address' to the sender of the adress (?)
-
Modules/Maintenance/MaintenanceControl.php
- in betriebFetchWarning(): a 'chat/fetch_warning' is send to each Store Mananger that needs alert
-
Modules/Message/MessageXhr.php
- in convMessage() : 'chat/message' is send
-
Modules/Region/RegionXhr.php
- in quickreply() : Each follower gets a 'forum/answer' on a quick reply
-
Modules/Settings/SettingsXhr.php
- in changemail2() : a 'user/change_email' is send on changing mail
-
Modules/WorkGroup/WorkGroupXhr.php
- in sendtogroup() : 'general/workgroup_contact' a message is sent to the workgroup email
-
Services/ForumService.php
- in notificationMail(): Sends a mail to each recipient
-
Services/MessageService.php
- in sendMailNotification(): sends notification about message, only if user is not logged in
-
Services/NotificationService.php
- in newFoodSharePointPost(): 'foodSharePoint/new_message' for each follower
- in sendEmailIfGroupHasNoAdmin(): 'general/workgroup_contact' send to (?)
Mails send with LibMail
-
Modules/Email/EmailControl.php
- in handleEmail() : (?)
-
Controller/NewsletterRestController.php
- in sendTestEmailAction() : Sends test newsletter mail to an address
-
Lib/Xhr/XhrMethods.php
- in xhr_continueMail(): continues sending mails to new recipients (?)
-
Modules/WorkGroup/WorkGroupXhr.php
- in applysend(): Send if someone applies for workgroup