-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sending messages to groups #6460
Conversation
LGTM 👍 Question: I have a group admin and a user admin who belongs to the group. But the administrator was to lazy to set an email address. Without the email address it will fail at mail/lib/Service/MailTransmission.php Line 225 in c8148e6
|
Good question. But I don't know how we could/should improve this. We could validate the inputs when a message is added to the outbox. Right now we don't do any of that. You can also add obvious non-email addresses as a sender and the app will just store it. |
When one user has no email address sending to a group is still not possible and fails with:
The old code used this check to make sure that email is not empty. Sounds like a good plan to add a warning to new message when some members of a group don't have a valid email address. So the sender is aware that not everyone is getting the email. Should i create a ticket for this? |
e48473e
to
6ff7131
Compare
I've added a filter for member to only consider those with an email address. |
Groups were expanded in the accounts controller. Since moving over to the outbox logic this feature was missing and internal group identifiers were passed to SMTP. With this patch groups are expanded again just before a message is sent. This means the group memberships are read as late as possible and editing an outbox message looks like the original message because members have not been expanded there yet. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6ff7131
to
1a3a389
Compare
I applied the patch and sending mails to groups is working. However, some email servers (GMX, web.de) didn't accept the mails, which didn't happen before. I get this error: Remote host said: 554-Transaction failed Sending emails to the same recipients works if I don't use the group. Maybe the email headers are not syntactically correct. |
Could you file that as a new ticket @LostinSpacetime? Do you have access to the email headers/text that get rejected? |
/backport to stable1.12 |
I did file a new bug report here #6497 |
Groups were expanded in the accounts controller. Since moving over to
the outbox logic this feature was missing and internal group identifiers
were passed to SMTP.
With this patch groups are expanded again just before a message is sent.
This means the group memberships are read as late as possible and
editing an outbox message looks like the original message because
members have not been expanded there yet.
How to test
On main/v1.12.0: 💥
Here: 😎
Regression of #6031
Fixes #6382