Forums

Email Problem - Joomla or Chronoforms?

zoom 11 Aug, 2010
I'm pretty sure this problem isn't with my host but I can't seem to send any emails via form submission. I have always used Joomla (1.5.20) with the phpmailer option in the global configuration and Chronoforms (3.1 RC 5.5) without any problems. I just noticed that I'm getting the follow error message "Could not Instantiate mail function" To ensure that mail was working I did a test by sending an email using sendmail "sendmail -s "Test" [email]me@gmail.com[/email]". I also wrote a simple php script that would use the mail function (see below). Both worked.

Why would I be getting this message via Joomla & Chronoforms??


<?php
// The message
$message = "Hello,\nThis is a test\nHope you got it";
$message = wordwrap($message, 70);
// Send
mail('me@gmail.com', 'Testing', $message);
?>
GreyHead 11 Aug, 2010
Hi zoom ,

From memory that't a pretty generic Joomla! mail error message - it could mean many things.

Please turn debug on for your form and post the debug output - including the dummy email - here.

Bob
zoom 11 Aug, 2010
Greyhead,

The debug output seems to confirm that it was able to send the email successfully. However, the error message is displayed "Could not instantiate mail function." Do you think it might be something with my php settings? I'm running a pretty typical LAMP setup on CentOS 5.


Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [LastName] => Test [FirstName] => Testing [Address] => 78 Test Street [City] => Testcity [Postal] => S4R0A1 [Phone] => 3067775555 [EmailAddy] => me@gmail.com [Notes] => This is a test [Qty1] => 1 [Type1] => Jacket [Gender1] => Mens [Size1] => XS [Qty2] => 0 [Type2] => [Gender2] => [Size2] => [Qty3] => 0 [Type3] => [Gender3] => [Size3] => [Qty4] => 0 [Type4] => [Gender4] => [Size4] => [PaymentType] => Cheque [totalamt] => 45 [nameoncard] => [visamastnum] => [cardexpirymonth] => [cardexpiryyear] => [submit] => Place Order [2352504b74313694b139d10f4bffcf88] => 1 [1cf1] => 4addbb77180b1212c9ee1b29f7f6acf7 [chronoformname] => Clothing )
$_FILES Array: Array ( )
Form passed the plugins step (if enabled) OK
An email has been SENT successfully from (Excel Orders)myorders@gmail.com to admin@gmail.com
An email has been SENT successfully from (Excel Orders)myorders@gmail.com to EmailAddy
Debug End
GreyHead 11 Aug, 2010
Hi zoom,

The dummy emails aren't there but it looks to me as though you don't have a valid To address for the second Email setup.

An email has been SENT successfully from (Excel Orders)myorders@gmail.com to EmailAddy,



Bob
zoom 11 Aug, 2010
Bob,

The address that you are referring to is a form field which contains a valid email address. The field is named "EmailAddy". I have 2 email addresses setup for the form. One of the address is to send a copy to the person who completed the information on the form. Part of that information was their email address. This always worked in the past, has something changed? Do I need to specify a form field in the email setup differently?

Lee
GreyHead 12 Aug, 2010
Hi Lee,

If you use a To element in the setup it takes a proper Email address. Use a Dynamic To if you want to use an input name.

Bob
messyhead 09 Sep, 2010
Is it possible to use 2 field names in a dynamic fromname field?

I.e. forename,surname?
GreyHead 10 Sep, 2010
Hi messyhead,

No, but you can create a new variable combining the two in the OnSubmit Before Box.
<?php
$forename = JRequest::getString('forename', '', 'post');
$surname = JRequest::getString('surname', '', 'post');
$name = $forename.' '.$surname;
JRequest::setVar('name', $name');
?>
Then use name in the Dynamic FromName box

Bob

I strongly recommend that you do *not* use the Dynamic From Email element in your Email Setups. Using this often results in your emails being marked as spam and dropped into a spam filter. Instead use the static From Email with an address that matches the site domain name and use Dynamic ReplyTo Email for the user email. The result is the same but with a much better chance of good delivery.
This topic is locked and no more replies can be posted.