MAIL-DISABLED-001

JMail::send() returned false

MailDisabledException bubbles

Joomla 3 swallowed mail failure as false. Joomla 4 throws. Uncaught exceptions become a 500 on “send email”.

JMail::send() returned falsetry/catch MailDisabledException and RuntimeException

Dies at Joomla 3 → 4J3: Works nativelyJ4: Changed behaviourJ6: Changed behaviourBC plugin: not applicablePatch possible — review itJoomla API

What you will see

  • Class "Joomla\CMS\Mail\Exception\MailDisabledException"
  • Uncaught PHPMailer

Symptoms people search

mail send 500 · MailDisabledException · ErrorInfo

Replace this code

Swap JMail::send() returned false for try/catch MailDisabledException and RuntimeException.

Joomla 3

Remove or stop calling this

if (!$mailer->Send()) { echo $mailer->ErrorInfo; }

Joomla 4 / 6

Use this instead

try {
    $mailer->send();
} catch (\Joomla\CMS\Mail\Exception\MailDisabledException $e) {
    // Mail off in Global Config
} catch (\PHPMailer\PHPMailer\Exception $e) {
    $app->enqueueMessage($e->getMessage(), 'error');
}

How to fix it

  1. 1Wrap send() in try/catch.
  2. 2Do not read ErrorInfo as the only failure path.

Also known as

MailDisabledException · ErrorInfo · PHPMailer

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.