People might encounter the error "Error: 0 - Invalid address:" when sending emails after upgrading to Joomla! 3.5.1 which affects all BreezingForms versions lower than Build 885 (full) and Build 913 (lite) and ContentBuilder lower than 0.9.91.
Since this update very likely affects other extensions, as well, I'll explain how to fix this quickly.
Users of the full (with an active membership) or lite versions of BreezingForms and ContentBuilder can skip the steps below and simply download and update the extensions through the Joomla! extension manager.
Patching the error manually is simple:
- Search your extension for occurrences of the string "addReplyTo" (e.g. searching on the /administrator/components/*extensionname*/ and /components/*extensionname*/ folders.
- Check if the found occurrences look similar to this: addReplyTo( array($replyTo, $replyToName) )
- The important part here is that $replyTo and $replyToName are wrapped by "array( )". This will throw an error since Joomla! 3.5.1. If there is no such array, then it is already correct.
- The trick now is to simply remove the wrapping array() such that it would look like addReplyTo( $replyTo, $replyToName )
- Please note that the variables are called $replyTo and $replyToName and they might be called different depending on the extension you want to patch, so please don't do copy and paste from here.
- Now test if the error vanishes and emails are getting sent and you should be fine.
Update: Please note that this is not a Joomla! bug but a necessary change of behaviour as described here.
In fact, we extension developers (Crosstec included) used addReplyTo in a wrong fashion before, sorry for this!
Please note that Joomla!'s behaviour changed since 3.5.1 for any error that happens with emails, not just with addReplyTo() as stated above.
Before, Joomla! allowed previous transactions, such as form submissions, to pass and displayed notification messages at the top of the page about email issues that happened.
Now, Joomla! will throw a hard error (500) and stop the current transaction. This requires all extension developers to handle the thrown error, for example using a try / catch block and enqueuing the error message in the catch-block to restore the old behaviour (displaying a notification at the top of the page).