Skip to content

New Order not sending if a comma is followed by a blank space in the 'Send Order Email Copy To' field #25072

@jaxtheking

Description

@jaxtheking

Preconditions (*)

Magento 2.3.3
php7.1

Steps to reproduce (*)

  1. In the BO, go to Stores >> Configuration >> Sales >> Sales Emails
  2. Under Orders, in the 'Send Order Email Copy To' field, enter a list of emails in the following format: 'admin1@email.com, admin2@email.com' (note the blank space after the comma)

Expected result (*)

  1. The New Order email should be sent to the customer and the two admins

Actual result (*)

  1. No emails are sent out (not even the customer!), due to the following error:

main.ERROR: ' admin2' can not be matched against dot-atom format [] []

Obviously, Magento is not expecting a blank space before the email address: while not technically a bug, this could be easily avoided by trimming each email address after exploding the comma-separated string.

More importantly, this behaviour means that if an admin were to enter a list of emails containing one invalid email (e.g. correct@email.com,incorrect.com), the customer would not be receiving a new order email at all!
I think the error should be limited to the invalid email only.
I'm guessing this behaviour applies to all 'Send XXX Email Copy To' fields in the BO.

Regards,
Luca

Metadata

Metadata

Assignees

Labels

Component: EmailIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: PR CreatedIndicates that Pull Request has been created to fix issueReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions