понедельник, 21 апреля 2014 г.

Борьба с Joomla! и ChronoForms

Известно, что если web-сервер работает под Windows, возникают проблемы с использованием стандартных почтовых методов из php (они все заточены на sendmail, который есть в UNIX, но который совсем даже нет в Windows).
Ниже коротенькая статья, которая помогла решить одну очень важную проблему с использованием почты в модуле ChronoForms из под Joomla!


Chronoforms - Could not instantiate mail function

Posted by on Comments (0)
 Once updated from Joomla 3.0.1 to Joomla 3.1.1 Chronoforms stopped working. The good news is that we found out a solution:
First of all you have to uninstall the existing Chronoforms extension and install the latest one. I strongly suggest to backup the existing forms so that you can easily restore them.
If you are using the SMTP mailer (with Gmail for example) you may experience the error "Could not instantiate mail function".
To fix this issue, open the file located at position JOOMLA_ROOT\administrator\components\com_chronoforms\form_actions\email\email.php, scroll to line 216 and replace
1
$JMail = new JMail();
with
1
2
//$JMail = new JMail();
$JMail = JFactory::getMailer();
Everything will work!
Hope it helps

chromoforms component version: Chronoforms_V4_stable_J3.0
chromoforms module version: Mod_Chronoforms_J3.0_V4_RC3.5.3
joomla version. 3.1.1
SMTP: gmail
Server: Windows 2008