0

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.

9
  • are you using server email functionality or any SMTP extensions? Commented Jun 13 at 10:55
  • No, since I installed magento I simply set up the email template and that's it, without any particular extension. If I confused something I apologize and ask you to let me understand what I should check.
    – LoyckHope
    Commented Jun 13 at 13:54
  • because this is a fresh instance you need to install any SMTP module for your emails, Commented Jun 13 at 15:03
  • Sorry maybe I didn't explain myself well, it's not a new installation, it's almost 7/8 years that it's been online, and everything was working fine, recently the emails stopped working without me making any changes to the settings.
    – LoyckHope
    Commented Jun 13 at 15:07
  • it's hard to find the reason why suddenly emails stopped working without actually debugging, The most common issue will be the change in the configuration from the third-party vendor side. Commented Jun 13 at 15:11

1 Answer 1

0

@LoyckHope

Hey, follow the below given steps,

  1. Admin Configuration ->Log in to the Magento Admin Panel. ->Navigate to Stores -> Configuration -> Advanced -> System -> Mail Sending Settings.
  2. Verify Cron Jobs
  3. Check SMTP Configuration
  4. check Log files: var/log/system.log var/log/exception.log

Thank You!

1
  • Thanks for the reply, the first two points seem to be okay, now I will update the question with the errors that are in the logs you mentioned. I didn't modifyed nothing since the first time I installed magento and builded the website
    – LoyckHope
    Commented Jun 13 at 14:01

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.