Auto Responder

pollioni 13 Jun, 2009
I am fairly new at ChronnoForms and trying to have a thank you email go out when the form is submitted and am using the 'Form Code - On Submit code - after sending email:'

Here is the code I have put in.
<?php
$from ="me@you.com";
$fromname = "pollioni";
$recipient = $_POST['email'];
$subject = $_POST['subject'];
$html_message = "<p>Hi, Thank you for contacting me, I will respond as soon as possible.</p>";

mosMail($from, $fromname, $recipient, $subject, $html_message, true, );
?>


But I get an error and no mail sent when I submit it.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /hsphere/local/home/fairytale31/dev.fairytaledestinations.ca/components/com_chronocontact/libraries/customcode.php(42) : eval()'d code on line 2



I have even try replacing the $recipient and $subject to look like this:
<?php
$from ="me@you.com";
$fromname = "pollioni";
$recipient = "real_email_addr@gmail.com";
$subject = "Actual subject";
$html_message = "<p>Hi, Thank you for contacting me, I will respond as soon as possible.</p>";

mosMail($from, $fromname, $recipient, $subject, $html_message, true, );
?>

and get a slightly different error.

Parse error: syntax error, unexpected ')' in /hsphere/local/home/fairytale31/dev.fairytaledestinations.ca/components/com_chronocontact/libraries/customcode.php(42) : eval()'d code on line 8



I am using ver 3.1 RC5.1

Any help is appreciated.
GreyHead 13 Jun, 2009
Hi pollioni,

There are some small problems with your PHP which could be corrected, but why send an email this way when ChronoForms will handle it all for you?

Please check the Email Tutorial from the link on the menu bar above.

Bob
This topic is locked and no more replies can be posted.