Improve recipients validation on EmailsOnPushService
In !55550 (merged) we introduced an advanced validation for the recipients field. The validation checks that the number of email addresses in the field is not higher than the limit (currently 750).
- Currently we consider any string containing an
@
as a valid email address. We should review this validation and consider adding a more strict one likeDevise.email_regexp
. (Suggested in !55550 (comment 541829797)) - We only validate the presence of
recipients
, but should also verify that we have at least one valid recipient. (Suggested in !55550 (comment 542114593)) - We currently send the whole list of recipients including invalid ones to the worker that sends the emails. We can consider just sending valid ones.
Edited by Markus Koller