- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Joomla 3.x Troubleshooter. “TM Ajax Contact Form” module stopped working after engine update to Joomla 3.5.x version
July 21, 2016
This tutorial shows how to get rid of the phpmailerException: Invalid address error after engine update to Joomla 3.5.x version.

-
Please, open modules/mod_tm_ajax_contact_form/helper.php file in your editor.
-
There are two versions of code structure in helper.php file.
Example 1. Replace the following code:
if(isset($_POST['email'])) $sender = array($email, $name); else $sender = $name; $mail->setSender($sender); $mail->addRecipient($recipient); if(isset($cc_email)) $mail->addCC($cc_email); if(isset($bcc_email)) $mail->addBCC($bcc_email); $mail->setSubject($subject); $mail->isHTML(true); $mail->Encoding = 'base64'; $mail->setBody($formcontent);
With the following:
if(isset($email)){ $mail->setSender($email, $name); } else{ $mail->setSender($name); } $mail->addRecipient($recipient); if(isset($cc_email) && $cc_email>0){ $mail->addCC($cc_email); } if(isset($bcc_email) && $bcc_email>0) $mail->addBCC($bcc_email); } $mail->setSubject($subject); $mail->isHTML(true); $mail->Encoding = 'base64'; $mail->setBody($formcontent);
Example 2. Replace the following code:
if(isset($cc_email)) $mail->addCC($cc_email); if(isset($bcc_email)) $mail->addBCC($bcc_email); if(isset($subject)) $mail->setSubject($subject);
With the following:
if(isset($cc_email) && $cc_email>0){ $mail->addCC($cc_email); } if(isset($bcc_email) && $bcc_email>0){ $mail->addBCC($bcc_email); } if(isset($subject)){ $mail->setSubject($subject); }
-
Save changes and re-upload an updated file. Refresh the page and submit contact form. It works fine now.
Feel free to check the detailed video tutorial below:
Joomla 3.x Troubleshooter. “TM Ajax Contact Form” module stopped working after engine update to Joomla 3.5.x version