I've got a PHP form working, but need to add "autoRespond", anyone know?

i've developed a working PHP5 file to submit the form to the
webmaster (info@). Now, the client wants me to add on a custom
autoResponder. basically, the user fills out the form, the user
gets an e-mail saying thank you in the subject line and body copy,
says it came from info@ website.
Here's the PHP script that's linked to it:

I take the simple (though not free) way:
www.bebosoft.com/formstogo/
domerdel wrote:
> i've developed a working PHP5 file to submit the form to
the
> webmaster (info@). Now, the client wants me to add on a
custom
> autoResponder. basically, the user fills out the form,
the user gets
> an e-mail saying thank you in the subject line and body
copy, says it
> came from info@ website.
>
> Here's the PHP script that's linked to it:
>
>
>
> <?
> error_reporting(1);
> if ( $_POST['tpl'] == "mail_req.tpl" )
> $mailto = Array("[email protected]");
> else
> $mailto = Array("[email protected]","[email protected]");
>
> $subject="Celibre Web Inquiry: {$_POST['name']}";
>
> if ( $_POST['tpl'] == "mail_req.tpl" ) {
> $t_data=file_get_contents("mail_req.tpl");
> $subject="Req Cert Inquiry from Website";
> }
> elseif ( $_POST['tpl'] )
> $t_data=file_get_contents("mail_contact.tpl");
> else
> $t_data = file_get_contents("mail_template.tpl");
> foreach($_POST as $key=>$value)
> $t_data=str_replace("[".$key."]",$value,$t_data);
>
> if ( $_POST['companyname'] )
> $fromname=$_POST['companyname'];
> elseif ( $_POST['name'] )
> $fromname = $_POST['name'];
> else
> $fromname = $_POST['firstName'] . " " .
$_POST['lastName'];
>
> $headers = "MIME-Version: 1.0\n".
> "Content-type: text/html; charset=iso-8859-1\n".
> "From: \"Website.com\" <[email protected]>\n".
> "Date: ".date("r")."\n";
>
> foreach($mailto as $value) {
>
mail($value,$subject,$t_data,str_replace("[to]",$value,$headers));
> }
>
> header("location: thank_you.html");

Similar Messages

Maybe you are looking for

  • Can only play one song at a time!

    Hi, Having a bit of trouble with iTunes. when i press play on a song or album, it plays the song, but then dosent move onto the next song. it just reverts back to the Nothing Playing screen. Recently d/l iTunes 8.2 Any ideas???

  • SAP CRM Extracts BP, IBASE and Contracts to flat files

    Hi, We want to download SAP CRM (5.0) data to flat files (every month). The datasets are rather large (1mln per object) and we have identified different approaches to do this: - Using an ABAP report with BAPI's - Using an ABAP report with direct sele

  • Oracle database-level permission controll

    I have a Oracle 10g database user, and I want to use database-level permission controll. Database has a User table, and i want to grouping to 3 grups. Of course, business level has the permission controll also, but I don't want this. Please give me a

  • 1st Gen Apple TV Frozen

    A couple weeks ago, my first generation Apple TV froze up. It restarts fine. It does the wallpaper of photos fine. But it will not accept input from the remote (either the apple remote or my universal remote that I programmed). The cursor sits there

  • Graph wont allow dragging of cursor

    Im working on a vi that has been created by somebody else. The graph they have used doesn't allow you to drag cursors on it, it just gives you a zoom icon when you move your mouse over it. Whereas if i create a new graph, this does allow it. I have a