Auto Responders

In a lot of cases it is now just easier to script in your own email script after validation (similar to the way you would write a custom validation script). However basic auto responder functionality still exists. A few of the methods were renamed since the change from FormItBuilder. This may trip up a few people doing script conversions from FromItBuilder to JsonFormBuilder.

There is an example of an auto responder form in core/components/jsonformbuilder/docs/examples/JsonFormBuilder-autoresponder.php which shows the new methods. After creatingthe main form object, simply call the methods as shown below.

$o_form->setAutoResponderToAddress($o_form->postVal('email_address')); //this must be the field ID for your return email, NOT the email address itself
//You can also use an array of email addresses to send to multiple TO addresses.
$o_form->setAutoResponderToAddress(array('email@address1.com','email@address2.com'));
$o_form->setAutoResponderFromAddress('from@mybusiness.address');
$o_form->setAutoResponderFromName('Business Title');
$o_form->setAutoResponderReplyTo('reply@mybusiness.address');
//Set the email subject and content
$o_form->setAutoResponderSubject('Business Name - Thanks for contacting us!');
$o_form->setAutoResponderEmailContent('<p>Thank you for contacting us. Your submitted information is listed below.</p>{{tableContent}}<p>Thanks!</p>');
//In most cases these probably will not be used, but you can also send the responder to a CC and BCC address.
//$o_form->setAutoResponderCC('cc@address.com.au');
//$o_form->setAutoResponderBCC('bcc@address.com.au');