Tran Hong Quan created JAMES-4081:
-------------------------------------
Summary: Mailet to mail to all users
Key: JAMES-4081
URL: https://issues.apache.org/jira/browse/JAMES-4081
Project: James Server
Issue Type: Improvement
Affects Versions: 3.9.0
Reporter: Tran Hong Quan
# Why?
One customer wants a mail alias for writing to everybody hosted on the platform
(information on the mail service).
# Example
```
<mailet matcher="[email protected]" class="MailToAllUsers" >
<batchSize>100</batchSize>
</mailet>
```
Will replace existing recipients with all users (usersrepositroy.listUsers) as
recipient of the email.
This can be contributed into `server-mailets`.
# Performance notes
Note that this can cause significant processing as APPENDING emails for one
recipient can be a longish operation. Adding a batchSize parameter can be a
good idea:
- We treat the first batch of recipients directly says first 100
- Then uses mailetcontext().send(...) to send to all remaining recipients, by
groups of 100
That way we may prevent emails with excessive recipient count and also
paralelize the delivery
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]