I'm working on a clients' store, and face a problem with no order confirmations being sent.

The following error is logged in system.log:

[2019-06-11 11:53:04] main.ERROR: Invalid address format [] []

Looking for that error, I see that it is generated here:


public static function fromString($address, $comment = null)
        if (! preg_match('/^((?P<name>.*)<(?P<namedEmail>[^>]+)>|(?P<email>.+))$/', $address, $matches)) {
            throw new Exception\InvalidArgumentException('Invalid address format');

Address used: Firstname Surname Street 1 Village, 4444GH Nederland T: 1234567890 [email protected]

What is the exact issue? Im not the best at reading Regex so looking for the problem is hard in this case.

  • can you also share the dummy address and format you are using? Commented Jun 11, 2019 at 12:20
  • @AnkitSrivastava post updated with the information. However, I have tried many formats and all result in the same.
    – Digitaq
    Commented Jun 11, 2019 at 12:48
  • may be check ` [email protected]` does have some html code.Please check at database at order_address tabke
    – Amit Bera
    Commented Jun 11, 2019 at 13:56
  • @AmitBera all database records seem fine. How can I debug a Zend class? maybe logging $address somewhere will help me
    – Digitaq
    Commented Jun 11, 2019 at 17:05
  • update: logging the $address in Zend\Mail\Address.php gives: [email protected], now I have no idea what is going wrong. If anyone knows more an answer would be highly appreciated
    – Digitaq
    Commented Jun 11, 2019 at 17:32

1 Answer 1


Sales email copy field in Magento 2 Configuration had a wrong value:

[email protected],

Commas are used to separate multiple e-mailaddresses that a order confirmation copy need to be send to, but no second email was entered.

This caused Zend\Mail\Address.php to fail, trying to preg_match an empty string.

Will let Magento 2 developers know that this error reporting has to be improved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.