Joomla 3.5.1 introduced a change that broke FlexiContact, FlexiContactPlus, and RentalotPlus. The change also broke VirtueMart and probably many other extensions. Apparently the Joomla developers felt it acceptable to break third party extensions in a minor release of Joomla. The relevant discussion among the developers is here:
https://issues.joomla.org/tracker/joomla-cms/9577
A typical symptom of the problem is the appearance of an "Invalid address:" error after the user hits the Send button on a contact form.
One temporary solution is to replace the mail.php file with the version from Joomla 3.5.0. It is located here:
/libraries/joomla/mail/mail.php
The underlying problem is that in older versions of Joomla, the JMail::addReplyTo( ) function worked like this:
/** * Add Reply to email address(es) to the email * * @param array $replyto Either an array or multi-array of form * array([0] => email Address [1] => Name) * @param mixed $name Either an array or single string * * @return JMail Returns this object for chaining. * * @since 11.1 */ public function addReplyTo($replyto, $name = '')
In Joomla 3, this quietly changed to
/** * Add Reply to email address(es) to the email * * @param mixed $replyto Either a string or array of strings [email address(es)] * @param mixed $name Either a string or array of strings [name(s)] * * @return JMail Returns this object for chaining. * * @since 11.1 */ public function addReplyTo($replyto, $name = '')
Notice the subtle change to the first parameter. We must confess that we don't read the entire source code of Joomla at every release, looking for subtle changes like this, so we didn't notice the change. And the function continued to work perfectly as before - until Joomla 3.5.1, when suddenly, without warning, it stopped working if called with the first parameter set to an array containing an email address and a name.
We have released updates to all three affected components to fix this problem. If you don't want to upgrade at this time, and you are able to edit a text file on your server, you can simply apply the one-line fixes given below.
The basic solution is to change this:
$mail->addReplyTo(array($reply_to_email, $reply_to_name));
To this:
$mail->addReplyTo($reply_to_email, $reply_to_name);
FlexiContact
Please upgrade to version 9.01, here. If you don't want to upgrade, you can edit this file:
/components/com_flexicontact/models/email.php
Somewhere around line 322 (depending on your version) you will find this line:
$mail->addReplyTo(array($this->data->from_email, $this->data->from_name));
Change it to:
$mail->addReplyTo($this->data->from_email, $this->data->from_name);
FlexiContact Plus
The problem is fixed in version 11.03. If you don't want to upgrade, you can edit this file:
/components/com_flexicontactplus/models/email.php
Somewhere around line 424 (depending on your version) you will find this line:
$mail->addReplyTo(array($this->data->admin_reply_to_email, $this->data->from_name));
Change it to:
$mail->addReplyTo($this->data->admin_reply_to_email, $this->data->from_name);
Rentalot Plus
The problem is fixed in version 10.15. If you don't want to upgrade, you can edit this file:
/administrator/components/com_rentalotplus/helpers/email_helper.php
Somewhere around line 379 (depending on your version) you will find this line:
$mail->addReplyTo(array($email_info['reply_to'], ''));
Change it to:
$mail->addReplyTo($email_info['reply_to'], '');