CMS v4 Unable to send email

Hello, everyone!

I’m using version 4.1 of the CMS (Docker) and I noticed that the notification emails are not being sent. However, the message to recover the password is sent normally.

The users have their email addresses defined and the notification enabled. The LOG contains:

2876 56034fd 16-09-2024 20:20 CONSOLE GET ERROR Unable to send email notification mail to email@domain.com

2877 56034fd 16-09-2024 20:20 CONSOLE GET ERROR Unable to send email notification Error: You must provide at least one recipient email address.

Could this be a bug in V4?

PS. There is another recent thread with the same issue:

Hi!

I managed to make the CMS send the notification. Comparing the EmailNotificationsTask.php file between versions 3 and 4, I noticed that version 4 does an extra validation on the recipient’s address.
Removing this validation (which does not exist in V3), the notifications started working again. I know this is not the correct way to solve the problem, could someone please guide me on how I can notify the team?

File edited in:
var/www/cms/lib/XTR/EmailNotificationsTask.php

Original code V4:

if ($this->checkEmailPreferences($notification)) {
$mail->addAddress($notification->email);
$mail->addAddress($notification->email);
}

Edited to:
$mail->addAddress($notification->email);

1 Like

I think this condition is for this parameters:

image

Are these boxes checked on your users?

However, I don’t understand why the user address is added twice in the PHP object.

$mail->addAddress($notification->email);

Hi!, yes, both boxes was checked. But I went back to v3, partly because of these bugs, but mainly because I couldn’t overwrite the formatting of some modules, like ticker and clock.

@dan Could you please check this code ?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.