magento-2-smtp
magento-2-smtp copied to clipboard
Unable to send mail: Unknown error
Preconditions (*)
- Magento version 2.4.0
- PHP version 7.4
- SMTP Extension version 1.4.1
Steps to reproduce (*)
Installed extension running Send Test Email function
Expected result (*)
Email should be sent
Actual result (*)
Getting error: Unable to send mail: Unknown error Logs:
==> var/log/exception.log <==
[2020-08-21 19:54:41] main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Unable to send mail: Unknown error at /var/www/html/app/code/Magento/Email/Model/Transport.php:103, Laminas\\Mail\\Transport\\Exception\\RuntimeException(code: 0): Unable to send mail: Unknown error at /var/www/html/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:306)"} []
==> var/log/debug.log <==
[2020-08-21 19:54:41] main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Unable to send mail: Unknown error at /var/www/html/app/code/Magento/Email/Model/Transport.php:103, Laminas\\Mail\\Transport\\Exception\\RuntimeException(code: 0): Unable to send mail: Unknown error at /var/www/html/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:306)"} []
Hi,
Would you please provide me some screenshots of the Smtp configuration page and error message when you try sending test email in the configuration page.
Thank you!
This is the configuration (I am using Amazon SES) and tried it with both options SSL with port 465 and TLS with port 587:
This is the error I am getting on admin panel:
Hi,
Would you please let me know which version of Magento and Smtp you are using. Also, can you provide me the Smtp configuration you are using and the email account you use in General-> Stores Email Address so I can reproduce your problem?
Thank you!
Hi,
Would you please let me know which version of Magento and Smtp you are using. Also, can you provide me the Smtp configuration you are using and the email account you use in General-> Stores Email Address so I can reproduce your problem?
Thank you!
Versions are mentioned in the initial comment. Magento 2.4 and extension version is 1.4.1 The SMTP configuration is loaded from your provided templates and the email address is from gmail which is verified on Amazon SES.
Note: Same settings has been configured with another smtp extension and its working perfectly
Your problem may be due to module compatibility with Magento 2.4.0 version. I will check on the local page and will notify you of the results.
Thank you!
Any update on this issue. I have the same setup (i.e. Magento 2.4) and getting the same error. I'm trying to set it up with Sendgrid.
Same issue for me - no update?
Same issue here.
- Magento 2.4.2-p1
- "mageplaza/module-smtp": 1.9.0 (composer)
- using Mailgun SMTP settings to send email
- port: 587 / protocol: tls / host: smtp.mailgun.org / authentication: login
The test e-mail goes well and is delivered. But when some other action tries to send email we got error.
[2021-07-17 03:29:35] main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\Framework\Exception\MailException(code: 0): Unable to send mail: Unknown error at /var/www/mysite/src/vendor/magento/module-email/Model/Transport.php:103, Laminas\Mail\Transport\Exception\RuntimeException(code: 0): Unable to send mail: Unknown error at /var/www/mysite/src/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:304)"} []
@thomas7467 Did you fix it?
Hi, I'm using Magento 2.4.1 release, smtp extension version 4.3.2 I've configured the module with sendgrid , port 587, TLS, LOGIN and it works.
installed with composer : composer require mageplaza/module-smtp
Thanks, @thomas7467. This should be related to the newer version of Magento. I'll try to use AWS SES in my next test. Let's see.
same issue here using magento 2.4.2 report.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\Framework\Exception\MailException(code: 0): Unable to send mail: Unknown error at /app/vendor/magento/module-email/Model/Transport.php:103, Laminas\Mail\Transport\Exception\RuntimeException(code: 0): Unable to send mail: Unknown error at /app/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:304)"} []
Same issue here using magento 2.4.3 clean installatino + sampleData
main.ERROR: Unable to send mail: Unknown error {"exception":"[object] (Laminas\Mail\Transport\Exception\RuntimeException(code: 0): Unable to send mail: Unknown error at /var/www/html/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:298)"} []
magento 2.4.3., extension doesnt work
magento 2.4.3 smtp 4.7.0 / The test emails get through ok, but customers and shop admins don't get emails
You need to install magento from composer, not from github. Because version compare can not work.$this->helper->versionCompare('2.2.0').
OR edit code
public function getVersion() { $this->version = $this->version ?: $this->cache->load(self::VERSION_CACHE_KEY); if (!$this->version) { if (!($this->version = $this->getSystemPackageVersion())) { if ($this->getComposerInformation()->isMagentoRoot()) { //$this->version = $this->getComposerInformation()->getRootPackage()->getPrettyVersion(); $this->version = '2.4.3'; } else { $this->version = 'UNKNOWN'; } } $this->cache->save($this->version, self::VERSION_CACHE_KEY, [Config::CACHE_TAG]); } return $this->version; }
You need to install magento from composer, not from github. Because version compare can not work.$this->helper->versionCompare('2.2.0'). OR edit code
public function getVersion() { $this->version = $this->version ?: $this->cache->load(self::VERSION_CACHE_KEY); if (!$this->version) { if (!($this->version = $this->getSystemPackageVersion())) { if ($this->getComposerInformation()->isMagentoRoot()) { //$this->version = $this->getComposerInformation()->getRootPackage()->getPrettyVersion(); $this->version = '2.4.3'; } else { $this->version = 'UNKNOWN'; } } $this->cache->save($this->version, self::VERSION_CACHE_KEY, [Config::CACHE_TAG]); } return $this->version; }
Where found this path?
Hi, I did install both Magento 2 and SMTP Extension from composer.
The test email was sent and received successfully. But none of the other emails (Contact Us, User Signup, etc.) were sent. I got the following error.
[2022-03-22 15:35:44] main.ERROR: Unable to send mail: Unknown error {"exception":"[object] (Laminas\Mail\Transport\Exception\RuntimeException(code: 0): Unable to send mail: Unknown error at /var/www/html/magento2/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:298)"} []
Magento 2 version: 2.4.3-p1 SMTP Extension version: 4.7.0
Please help!