2

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:

Zend\Mail\Address.php

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 info@modl-design.com

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

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

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

info@mail.com,

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, privacy policy and cookie policy

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