By Guest on Wednesday, 05 March 2025
Posted in EasyDiscuss
Replies 1
Likes 0
Views 40
Votes 0
SMTP error.
If email can not be sent you get a SMTP error and unable to view easy discuss pages anymore.

So if I put a fake email in and you have email notification set.
When a user replies you will get a breaking bug.
Saying SMTP error with the fake email on screen.
SMTP error.
If email can not be sent you get a SMTP error and unable to view easy discuss pages anymore.

So if I put a fake email in and you have email notification set.
When a user replies you will get a breaking bug.
Saying SMTP error with the fake email on screen.


I had this error that breaks easydiscuss.

You only get this if you select joomla setting mailer to SMTP.

I have a work around for this fix.

/public_html/libraries/vendor/phpmailer/phpmailer/src/PHPMailer.php

on line 212

//Create error message for any bad addresses
if (count($bad_rcpt) > 0) {
$errstr = '';
foreach ($bad_rcpt as $bad) {
$errstr .= $bad['to'] . ': ' . $bad['error'];
}
throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE);
}

return true;
}


change to


//Fix Create error message for any bad addresses
if (count($bad_rcpt) > 0) {
$errstr = '';
foreach ($bad_rcpt as $bad) {
$errstr .= $bad['to'] . ': ' . $bad['error'] . '; ';
}

// Log the error instead of throwing an exception
error_log('SMTP Error: ' . $errstr);

// Optionally, return false to indicate a failure without stopping execution
return false;
}

return true;

}
·
1 week ago
·
0 Likes
·
0 Votes
·
0 Comments
·
#67
View Full Post