error "Could not instantiate mail function" on submit

bosscon1 19 Dec, 2011
I'm a newbie here...

Chronoforms is the best form build for joomla on the web, and my installation with joomla 1.7 was working fine until today. I email all form data in a simple form to a working email, and instead of receiving the email I get "Could not instantiate mail function".

So I read through some of the older posts on this issueI checked the email address-it works...I double checked joomla's email functionality by clicking on the email icon on an article and the email went through fine. I double checked the settings on the forms that used to work and couldn't find anything out of place. So I enabled debug on the site, and this is what I got when I hit submit...
Backtrace
Call stack
# 	Function 	Location
1 	JSite->dispatch() 	/home1/thropgco/public_html/bossconstruction.com/index.php:43
2 	JComponentHelper::renderComponent() 	/home1/thropgco/public_html/bossconstruction.com/includes/application.php:191
3 	require_once() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/application/component/helper.php:156
4 	process() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/chronoforms.php:49
5 	CFChronoForm->process() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/chronoforms.php:60
6 	CFChronoForm->_processEvents() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:100
7 	CFChronoForm->_processAction() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:123
8 	CFChronoForm->runAction() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:146
9 	CfactionEmail->run() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:165
10 	JUtility::sendMail() 	/home1/thropgco/public_html/bossconstruction.com/administrator/components/com_chronoforms/form_actions/email/email.php:208
11 	JMail->sendMail() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/utilities/utility.php:50
12 	JMail->Send() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/mail/mail.php:409
13 	JError::raiseNotice() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/mail/mail.php:77
14 	JError::raise() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/error/error.php:297


I have installed and removed modules lately...don't know if code got messed up somewhere? I re-installed chronoforms 1.6 V4 rc2.0 and tried a new form and same problem. FYI I'm using a rocket theme template (probabaly doesn't matter b/c it worked in the past.). Does anyone have any ideas on what I should try next? I get the feeling that it's something simple...
bosscon1 19 Dec, 2011
update:

now on submit, the form outputs to a "404 component not found"...

404 - Component not found

You may not be able to visit this page because of:

    an out-of-date bookmark/favourite
    a search engine that has an out-of-date listing for this site
    a mistyped address
    you have no access to this page
    The requested resource was not found.
    An error has occurred while processing your request.

Please try one of the following pages:

    Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below..

Component not found

Call stack
# 	Function 	Location
1 	JSite->dispatch() 	/home1/thropgco/public_html/bossconstruction.com/index.php:43
2 	JComponentHelper::renderComponent() 	/home1/thropgco/public_html/bossconstruction.com/includes/application.php:191
3 	JError::raiseError() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/application/component/helper.php:113
4 	JError::raise() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/error/error.php:250


is it a component or module of some kind that I may have inadvertently unpublished or trashed perhaps?
GreyHead 20 Dec, 2011
Hi bosscon,

Please test using the FrontEnd link in the forms manager and add a Debugger action to the form to see if you get any sensible output that way. Also check the URL displayed when you get the error message as that may have clues.

You can also try setting Relative URL to 'No' on the Form General tab as that will sometimes clear URL problems.

Bob
bosscon1 20 Dec, 2011
Bob,

Thanx for the quick reply! I disabled relative URL...Turned on Debug under global config and still got the same error...here's the url
http://bossconstruction.com/index.php?option=com_chronoforms&chronoform=estimate_request&event=submit


Doesn't look like that provides alot of info-maybe you see something I don't?

Here's the debug output:
Backtrace
Call stack
# 	Function 	Location
1 	JSite->dispatch() 	/home1/thropgco/public_html/bossconstruction.com/index.php:43
2 	JComponentHelper::renderComponent() 	/home1/thropgco/public_html/bossconstruction.com/includes/application.php:191
3 	require_once() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/application/component/helper.php:156
4 	process() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/chronoforms.php:49
5 	CFChronoForm->process() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/chronoforms.php:60
6 	CFChronoForm->_processEvents() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:100
7 	CFChronoForm->_processAction() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:123
8 	CFChronoForm->runAction() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:146
9 	CfactionEmail->run() 	/home1/thropgco/public_html/bossconstruction.com/components/com_chronoforms/libraries/chronoform.php:165
10 	JUtility::sendMail() 	/home1/thropgco/public_html/bossconstruction.com/administrator/components/com_chronoforms/form_actions/email/email.php:208
11 	JMail->sendMail() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/utilities/utility.php:50
12 	JMail->Send() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/mail/mail.php:409
13 	JError::raiseNotice() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/mail/mail.php:77
14 	JError::raise() 	/home1/thropgco/public_html/bossconstruction.com/libraries/joomla/error/error.php:297
Could not instantiate mail function.


I cleared and rebuilt the email template..no dice. I disabled SEF urls in global config-to no avail. Any other ideas?
GreyHead 20 Dec, 2011
Hi bosscon,

It tells us a little - mostly that PHPMailer is returning a 'false' value. But not why :-(

Please drag a Debugger action into the form On Submit event and see if that gives any out put when you submit the form.

Bob
bosscon1 20 Dec, 2011
OK. Here's the output. I put a debug into the pass and fail actions. It's a bit long, but here's the response:

Data Array:

Array
(
    [description] => patio
    [name] => brian
    [city] => atlanta
    [email:] => brian@3opg.com
    [phone] => 999-888-7777
    [start_date] => 2011-12-16
    [chrono_verification] => ewldf
    [ON_submit] => GET ESTIMATE
    [4a47f501098fc0475dcee8710fba7363] => 1
    [option] => com_chronoforms
    [chronoform] => estimate_request
    [event] => submit
    [Itemid] => 134
    [view] => article
    [id] => 0
)

Could not instantiate mail function. Could not instantiate mail function. Data Array:

Array
(
    [description] => patio
    [name] => brian
    [city] => atlanta
    [email:] => brian@3opg.com
    [phone] => 999-888-7777
    [start_date] => 2011-12-16
    [chrono_verification] => ewldf
    [ON_submit] => GET ESTIMATE
    [4a47f501098fc0475dcee8710fba7363] => 1
    [option] => com_chronoforms
    [chronoform] => estimate_request
    [event] => submit
    [Itemid] => 134
    [view] => article
    [id] => 0
)

Data Array:

Array
(
    [description] => patio
    [name] => brian
    [city] => atlanta
    [email:] => brian@3opg.com
    [phone] => 999-888-7777
    [start_date] => 2011-12-16
    [chrono_verification] => ewldf
    [ON_submit] => GET ESTIMATE
    [4a47f501098fc0475dcee8710fba7363] => 1
    [option] => com_chronoforms
    [chronoform] => estimate_request
    [event] => submit
    [Itemid] => 134
    [view] => article
    [id] => 0
)

Data Array:

Array
(
    [description] => patio
    [name] => brian
    [city] => atlanta
    [email:] => brian@3opg.com
    [phone] => 999-888-7777
    [start_date] => 2011-12-16
    [chrono_verification] => ewldf
    [ON_submit] => GET ESTIMATE
    [4a47f501098fc0475dcee8710fba7363] => 1
    [option] => com_chronoforms
    [chronoform] => estimate_request
    [event] => submit
    [Itemid] => 134
    [view] => article
    [id] => 0
)

Debug Data

    Core Captcha
        Passed the core captcha check!
    An email has been SENT successfully from (brian)noreply@3opg.com to brian@3opg.com
    Email template:

    Please fill out as much information as you would like and then click the 'GET ESTIMATE' button.  If your request is made during business hours, someone from our office will usually contact you the same day.  NOTE: If you have any photos, drawings, or other attachments you would like to send to us, or if you are having trouble with this form, you can email your information to mail@bossconstruction.com.  Describe your project: patio Your name: brian Your city: atlanta Your email: brian@3opg.com Your phone number: 999-888-7777 When would you like to start the project? 2011-12-16 Enter the verification code: ewldf

Someone should contact you within 24 hours.
Debug Data

    Core Captcha
        Passed the core captcha check!
    An email has been SENT successfully from (brian)noreply@3opg.com to brian@3opg.com
    Email template:

    Please fill out as much information as you would like and then click the 'GET ESTIMATE' button.  If your request is made during business hours, someone from our office will usually contact you the same day.  NOTE: If you have any photos, drawings, or other attachments you would like to send to us, or if you are having trouble with this form, you can email your information to mail@bossconstruction.com.  Describe your project: patio Your name: brian Your city: atlanta Your email: brian@3opg.com Your phone number: 999-888-7777 When would you like to start the project? 2011-12-16 Enter the verification code: ewldf

Debug Data

    Core Captcha
        Passed the core captcha check!
    An email has been SENT successfully from (brian)noreply@3opg.com to brian@3opg.com
    Email template:

    Please fill out as much information as you would like and then click the 'GET ESTIMATE' button.  If your request is made during business hours, someone from our office will usually contact you the same day.  NOTE: If you have any photos, drawings, or other attachments you would like to send to us, or if you are having trouble with this form, you can email your information to mail@bossconstruction.com.  Describe your project: patio Your name: brian Your city: atlanta Your email: brian@3opg.com Your phone number: 999-888-7777 When would you like to start the project? 2011-12-16 Enter the verification code: ewldf

Debug Data

    Core Captcha
        Passed the core captcha check!
    An email has been SENT successfully from (brian)noreply@3opg.com to brian@3opg.com
    Email template:

    Please fill out as much information as you would like and then click the 'GET ESTIMATE' button.  If your request is made during business hours, someone from our office will usually contact you the same day.  NOTE: If you have any photos, drawings, or other attachments you would like to send to us, or if you are having trouble with this form, you can email your information to mail@bossconstruction.com.  Describe your project: patio Your name: brian Your city: atlanta Your email: brian@3opg.com Your phone number: 999-888-7777 When would you like to start the project? 2011-12-16 Enter the verification code: ewldf



still, no email is sent.
GreyHead 20 Dec, 2011
Hi bosscon1,

Hmm - that all look fine apart from this line
[email:] => brian@3opg.com

If you have a colon in that input name please will you remove it. It's not a permitted character in an input name - and there's a small chance that it might be causing the error.

Bob
GreyHead 21 Dec, 2011
Hi bosscon1,

I took a look at your form and everything looks OK as far as ChronoForms is concerned. But the message is still displaying. I tried switching the site mailer to SendMail - that gives a different error message but still fails.

I also edited the mail.php file temporarily to dump more error info but didn't find anything helpful :-(

I also tried adding an Email Me link to an article to test the email - but that didn't display.

Lastly I restored a backup copy of the form on my own test site and from there the emails are sent OK.

I suggest that you contact your webhost to see what suggestions they have and/or set up the site to use an SMTP mailer to see if that resolves the problem.

Bob

PS I removed some of the un-used actions from your form just in case anything was getting in the way.
This topic is locked and no more replies can be posted.