Forums

"Could not instantiate mail function." response from submitting form

DennisRick 24 Apr, 2016
I am using the ChronoForm v4 Component / Plugin to display my form.

Upgraded to Joomla 3.5.1 then ChronoForm v4 displays error "Notice Could not instantiate mail function." after submitting information in my form.

In my Joomla administration page I attempted to see the Components / ChronoForms and get the error on this page:

http://waterstreetglassworks.org/wsgw/administrator/index.php?option=com_chronoforms

"The waterstreetglassworks.org page isn’t working
waterstreetglassworks.org is currently unable to handle this request.
500"

I then installed the latest update to ChronoForms Component:
Chronoforms_V4.0.6_J3.zip
and now I can once again see the Component in my Joomla administration page and view the Forms functions - Manager, Wizard, etc.

Form submission still fails.

I saw some posts on the Internet about the Joomla function addReplyTo() no longer accepting an "array( )" as an argument so I removed the array() in:
C:\Joomla3\public_html\wsgw\administrator\components\com_chronoforms\form_actions\email_gh\email_gh.php [line 289]
$mail->addReplyTo(array($replyto_email, $replyto_name));

but that didn't help anything.

I don't know what further to do to correct this problem.

thanks
GreyHead 25 Apr, 2016
Hi DennisRick,

I will PM you with a link to an updated version of the Email [GH] action.

Bob
DennisRick 25 Apr, 2016
Thank you for the file. Unfortunately I still get the error but maybe I should make a change to my actions.

I have a "mail" action but since you sent me "mail_gh" I added a "mail(gh)" action to my form in front of the "mail" action. Maybe I must remove the "mail" action? I hated to do any more damage to my form than necessary.

Also, I had difficulty installing the action zip file (...not uploaded for security reasons!). The easiest way to get it loaded was to "temporarily" add to the JFile::upload( ... , false, true) in your controller.php.

Also, I note that the upload error I got was spelled "UPLAOD" in a couple of places. Too bad that's not the cause of all my troubles - I can fix that problem.

Thank you. I'm sorry I'm still needy and continue to have the problem.
GreyHead 25 Apr, 2016
Hi DennisRick,

I'm now confused, the error message you posted in your first post was from the EMail [GH] action, not the standard Email action.

You can manually install the action by unzipping the file and copying the folder inside to the /administrator/components/com_chronoforms/form_actions folder on your site if your server settings block normal installation.

There should be no problem having both actions installed and used - but you really only need one of them.

Bob
DennisRick 25 Apr, 2016
Sad to say my organization no longer has a Contact Us form. I give up. Does seem likely it's a Joomla problem and I've tried everything you suggested and others on the Internet have suggested including using the previous mail.php file in Joomla, having a non-blank replyTo, using ChronoForm mail(gh) action in place of mail action.

It's the ChronoForm "$email_sent = $mail->Send();" apparently that is returning the phrase "Could not instantiate mail function." The statements before that one appear to work, for example, I commented them all out except getInstance and got the message that I didn't have a body.

***
Also, it isn't the server blocking the action uploads in ChronoForm manager. It's Chronoforms usage of "JFile::upload()" without including the illegal file override "JFile::upload(...., false, true);"
Thanks
GreyHead 26 Apr, 2016
HI Dennis,

You might try CFv5 - that should work with the Joomla! Mailer settings, but also has the option to set up a separate SMTP connection in the CF settings if you need to.

Bob

PS Thanks for the heads up on the File::upload change - I hadn't seen that before, I've updated the Joomla! 3.5 FAQ with the changes needed.
DennisRick 29 Apr, 2016
Discovered yet another way for e-mail failure:

Our web server company uses SpamAssassin unbeknownst to me; our web site ChronoForm e-mail was tagged as bad and that from very few e-mails a month from users. The Joomla system test e-mail was not tagged as spam so that was misleading when it came through okay. I chastised them for doing damage to our web site without notification (they had even said they didn't make any changes to the e-mail system but they had even if indirectly).

ChronoForms works perfectly.

Thanks for your help
This topic is locked and no more replies can be posted.