Skip to content

Magento 2.3.4 emails not working

My Magento 2.3.4 doesn’t send emails. I’ve checked these options:

  1. Stores -> Configuration -> Advanced -> System
    Disable Email Communications is set to No.
  2. Navigate to Stores
    -> Configuration -> Sales -> Sales Emails under the General Settings tab, Asynchronous sending disabled.

However, despite these checks, the issue persists. In the log, I found the following error:

main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\Framework\Exception\MailException(code: 0): Unable to send mail: Unknown error at /home/customer/www/mysite/public_html/vendor/magento/module-email/Model/Transport.php:103, Zend\Mail\Transport\Exception\RuntimeException(code: 0): Unable to send mail: Unknown error at /home/customer/www/mysite/public_html/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:305)"} []

My PHP version is 7.3.33 with SiteGround. The emails were working correctly until about 1-2 years ago.

UPDATE

LOGS:

main.WARNING: Broken reference: The element with the "customer" ID wasn't found. Verify the ID and try again. [] []

main.CRITICAL: Deprecated Functionality: Method ReflectionParameter::getClass() is deprecated in /home/customer/www/mysite/public_html/vendor/magento/framework/Code/Reader/ClassReader.php on line 36 {"report_id":"bbc7faab10cdb433fd895c751eca68f9aae15f45606dc465c9f86a4d7e5db962","exception":"[object] (Exception(code: 0): Deprecated Functionality: Method ReflectionParameter::getClass() is deprecated in /home/customer/www/mysite/public_html/vendor/magento/framework/Code/Reader/ClassReader.php on line 36 at /home/customer/www/mysite/public_html/vendor/magento/framework/App/ErrorHandler.php:61)"} []

MAIL SETTINGS
MAIL SETTINGS

PHP VARIABLES ON WEBSERVER
PHPVAR

If i use sendmail command through ssh the emails are sent.