Fixed 2.3b5 TypeError: XF\Mail\Mailer::queue()

cjwinternet

Active member
Affected version
2.3 Beta 5
Running our test site... email and email queue disabled in config (although the error still appears when enabled). All plugins are disabled.

When submitting a new thread, this message appears...

Screenshot_5.webp

The post is actually submitted though.

This doesn't happen on every node though, or in every category.
 
Server error log
  • TypeError: XF\Mail\Mailer::send(): Argument #1 ($email) must be of type Symfony\Component\Mime\Email, Symfony\Component\Mime\Message given, called in /home/days28cp/public_html/28dl-testing.co.uk/src/XF/Mail/Mail.php on line 581
  • src/XF/Mail/Mailer.php:287
  • Generated by: Unknown account
  • Apr 24, 2024 at 7:51 PM

Stack trace​

#0 src/XF/Mail/Mail.php(581): XF\Mail\Mailer->send(Object(Symfony\Component\Mime\Message), NULL)
#1 src/XF/Job/ActivitySummaryEmail.php(115): XF\Mail\Mail->send()
#2 src/XF/Job/ActivitySummaryEmail.php(68): XF\Job\ActivitySummaryEmail->generateAndSendEmail(Object(XF\Entity\User))
#3 src/XF/Job/Manager.php(272): XF\Job\ActivitySummaryEmail->run(8)
#4 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#6 job.php(43): XF\Job\Manager->runQueue(false, 8)
#7 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(40) "https://www.28dl-testing.co.uk/admin.php"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Delete
 
So, we tried again, disabled all plugins before the upgrade this time.
The result was the same. Complete failure as far as a working forum is concerned.
 
Complete failure as far as a working forum is concerned.
Of course it's not supposed to be used on a working forum...

We're a little confused by this. We are going to look into it, but very odd we've had no other reports of this and, clearly, this is also a working forum and we've not had such an issue.

Do let us know if the situation changes though.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 6).

Change log:
Fix sending emails when DKIM signing is enabled
There may be a delay before changes are rolled out to the XenForo Community.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 6).

Change log:

There may be a delay before changes are rolled out to the XenForo Community.

Why's it trying to send emails when email functions are turned off in config.php?
 
It's a good question and that initially alarmed me but it's because the way we disable mail sending is actually not to prevent any of the code paths that generate emails, but rather we change the transport mechanism for mail to use a special NullTransport class. Rather than transmitting the email (via either SMTP/Sendmail depending on what you have configured) it just doesn't do anything.

It's useful from a development point of view because as far as XenForo is aware, the email was sent and it means any code we have used to send emails still works, even though nothing is actually sent.
 
Back
Top Bottom