Skip to content
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

General Email sending does not work #3

Open
bst2002git opened this issue Mar 11, 2020 · 1 comment
Open

General Email sending does not work #3

bst2002git opened this issue Mar 11, 2020 · 1 comment

Comments

@bst2002git
Copy link

bst2002git commented Mar 11, 2020

Magento 2.3.3-p1

see my attempt at the fork: https://github.com/bst2002git/aitoc-magento-2-smtp.git Branch=development

"PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Mail\AddressConverter::convertMany() must be of the type array, object given, called in /usr4/data/web2124/web/vendor/magento/framework/Mail/Template/TransportBuilder.php on line 437 and defined in /usr4/data/web2124/web/vendor/magento/framework/Mail/AddressConverter.php:59
Stack trace:
#0 /usr4/data/web2124/web/vendor/magento/framework/Mail/Template/TransportBuilder.php(437): Magento\Framework\Mail\AddressConverter->convertMany(Object(Zend\Mail\AddressList))
#1 /usr4/data/web2124/web/vendor/magento/framework/Mail/Template/TransportBuilder.php(201): Magento\Framework\Mail\Template\TransportBuilder->addAddressByType('to', Object(Zend\Mail\AddressList), '')
#2 /usr4/data/web2124/web/vendor/aitoc/smtp/Model/Sender.php(71): Magento\Framework\Mail\Template\TransportBuilder->addTo(Object(Zend\Mail\AddressList))
#3 /usr4/data/web2124/web/vendor/aitoc/smtp/Controller/Adminhtml/Log/Resend.php(34): Aitoc\Smtp\Model\Sender->sen"

in File Sender.php i've made this to test:

public function sendByLogId($logId)
{
...
$data[LogInterface::RECIPIENT_EMAIL]= iconv('UTF-8', 'ASCII//TRANSLIT', $data[LogInterface::RECIPIENT_EMAIL]);

$this->transportBuilder
->addTo($this->prepareEmailsData($data[LogInterface::RECIPIENT_EMAIL])[0]['email'],$this->prepareEmailsData($data[LogInterface::RECIPIENT_EMAIL])[0]['name'])
->setFrom($this->prepareEmailsData($data[LogInterface::SENDER_EMAIL], true));

recipient_email used: <Ronny Schönberger>test@example.com

status_message: Invalid header value detected

This are the Headers:
/web/vendor/aitoc/smtp/Model/Framework/Mail/Transport.php__construct =
model/Transport.php sendMessage() =
model/Transport.php isNewSender() =
model/Transport.php $this->message->getRawMessage() = Date: Wed, 11 Mar 2020 09:38:00 +0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Subject: =?UTF-8?Q?Bestellbest=C3=A4tigung=20f=C3=BCr=20Ihre=20Bestellung=20bei=20?=
=?UTF-8?Q?test=20Inc.?=
To: =?utf-8?Q?Ronny=20Sch=C3=B6nberger?= test@example.com
From: =?utf-8?Q?test=20OrderAndSales?= test@example.com

@kestutisks
Copy link

Have same issue. Any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants