VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: holanpan7 on December 05, 2025, 15:46:03 PM

Title: Invalid email address triggers 500 error on Joomla 5 + VirtueMart 4.6
Post by: holanpan7 on December 05, 2025, 15:46:03 PM
Hello,

I've encountered an issue with VirtueMart 4.6.0 (build 11214) running on Joomla 5.

When a new customer account is created with an invalid email address, VirtueMart tries to send the registration email.
Since the domain does not exist, PHPMailer returns an SMTP error :
SMTP Error: The following recipients failed: xxx.xx.vom: Requested action not taken: mailbox unavailable invalid DNS MX or A/AAAA resource record 1MT9v5-1vdEna0eaN-00XCDc

The result is a full 500 crash, even though the user account is actually created correctly.

In previous VirtueMart versions, an invalid email would simply display a notice such as SMTP error email invalid not a fatal error and the registration process continued normally.

Is this a known issue with VirtueMart 4.6 on Joomla 5? Is there a workaround?

Thank you for your help!
Title: Re: Invalid email address triggers 500 error on Joomla 5 + VirtueMart 4.6
Post by: holanpan7 on December 09, 2025, 09:46:51 AM
Hello,
I'm still experiencing this issue in VirtueMart 4.6 on Joomla 5.
Could anyone confirm if this SMTP crash on invalid email is reproducible on your setups?

Thank you in advance!
Title: Re: Invalid email address triggers 500 error on Joomla 5 + VirtueMart 4.6
Post by: holanpan7 on December 26, 2025, 16:30:05 PM
Hi,

I think (hope) i managed to solve the problem.

in administrator\components\com_virtuemart\models\user.php

I changed

// Send the registration email. if (VmConfig::showDebug() and $debug_email == 'debug_email') { $msg = 'Registration Debug mail active, no mail sent. The mail to send subject ' . $emailSubject . ' to "' . $data['email'] . '" from ' . $data['mailfrom'] . ' ' . $data['fromname'] . ' ' . vmText::$language->getTag() . '<br>' . $emailBody; vmdebug($msg); $return = true; } else { if (JFactory::getApplication()->get('mailonline', 1)) { if (JVM_VERSION >= 4) { $mailer = new \Joomla\CMS\Mail\MailTemplate($mailtemplate, $app->getLanguage()->getTag()); $mailer->addTemplateData($data); $mailer->addRecipient($data['email']); $return = $mailer->send(); } else { $return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody); } } }
to

// Send the registration email.
if (VmConfig::showDebug() and $debug_email == 'debug_email')
{
$msg = 'Registration Debug mail active, no mail sent. The mail to send subject ' . $emailSubject . ' to "' .   $data['email'] . '" from ' . $data['mailfrom'] . ' ' . $data['fromname'] . ' ' . vmText::$language->getTag() . '<br>' . $emailBody;
vmdebug($msg);
$return = true;
}
else
{
$return = true;

if (JFactory::getApplication()->get('mailonline', 1))
{
try {
if (JVM_VERSION >= 4)
{
$mailer = new \Joomla\CMS\Mail\MailTemplate($mailtemplate, $app->getLanguage()->getTag());
$mailer->addTemplateData($data);
$mailer->addRecipient($data['email']);

$return = $mailer->send();
}
else
{
$return = JFactory::getMailer()->sendMail(
$data['mailfrom'],
$data['fromname'],
$data['email'],
$emailSubject,
$emailBody
);
}
}
catch (\Throwable $e)
{

$return = false;

// Log technique
if (class_exists('\Joomla\CMS\Log\Log')) {
\Joomla\CMS\Log\Log::add(
'Registration mail failed for ' . ($data['email'] ?? '-') . ' : ' . $e->getMessage(),
\Joomla\CMS\Log\Log::WARNING,
'mail'
);
}
}

// Message to user
if (!$return) {
if (function_exists('vmWarn')) {
vmWarn("Confirmation e-mail not sent (e-mail adress / invalid domain).Your account is created, you can continue.");
} else {
$app->enqueueMessage("Confirmation e-mail not sent (e-mail adress / invalid domain).Your account is created, you can continue.", "warning");
}

}
}
}

so now when the e-mail domain is invalid, it does not crash the site but display a warning message.

Hope it helped
Title: Womens In Your City - Anonymous Sex Dating - No Selfie
Post by: j45p41 on February 23, 2026, 01:58:11 AM
Womens In Your Town - No Selfie - Anonymous Casual Dating
https://SecreLocal.com
 
 Womens In Your Town  (https://secrelocal.com) - Anonymous Casual Dating - No Verify
 
New Girls
Maria Luna (https://secrelocal.com/girl/maria-luna-94.html)
Chloe Ziva VIP (https://secrelocal.com/girl/chloe-ziva-vip-63.html)
Anastasia Doll (https://secrelocal.com/girl/anastasia-doll-12.html)
Carolina (https://secrelocal.com/girl/carolina-71.html)
Jessie (https://secrelocal.com/girl/jessie-107.html)
Linda Warners (https://secrelocal.com/girl/linda-warners-134.html)
Vanessa (https://secrelocal.com/girl/vanessa-96.html)