Call to mail() is failing when is calling without call a constructor

Created on 7 April 2023, almost 2 years ago

Problem/Motivation

I got this issue at time to send an email programatically:

 Call to a member function has() on null in Drupal\Core\Mail\Plugin\Mail\PhpMail->mail() (line 117 of /var/www/html/web/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php).             
  234   07/Apr 01:42   php      Warning    Warning: Attempt to read property "server" on null in Drupal\Core\Mail\Plugin\Mail\PhpMail->mail() (line 117 of /var/www/html/web/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php)

Steps to reproduce

After some debug I see that when we use /core/lib/Drupal/Core/Mail/MailManager.php at line 307 we is calling

$message['result'] = $system->mail($message);

where $system isn't call to a constructor for PhpMail class.

🐛 Bug report
Status

Active

Version

10.1

Component
Mail 

Last updated 19 days ago

No maintainer
Created by

🇧🇴Bolivia vacho Cochabamba

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024