PDA

View Full Version : How to get form results to email to ADDR in the form



buzzardb
05-21-2006, 05:56 PM
I need some help. How do I get the results of a form to email directly to the customer's email address they entered on the form?

navaldesign
05-21-2006, 06:12 PM
You mean appart from the email that will be sent to you ? Just add before the end of the script the same code used for sending the email to you, changing the subject, and the destination email address.

For example, my script ends like this:

//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "Data submitted from Navaldesign Feedback Form";
$pfw_email_to = "myemail@navaldesign.info";
$pfw_message = "Email : $Email\n"
. "Nome : $Nome\n"
. "Cognome : $Cognome\n"
. "Azienda : $Azienda\n"
. "Posizione : $Posizione\n"
. "Indirizzo : $Indirizzo\n"
. "Citta : $Citta\n"
. "Provincia - CAP : $Provincia\n"
. "Nazione : $Nazione\n"
. "Telefono : $Telefono\n"
. "Fax : $Fax\n"
. "Cellulare : $Cellulare\n"
. "Sito Internet : $Sito_Internet\n"
. "Testo di_contatto : $Testo_di_contatto\n"
. "Priorita : $Priorita\n"
. "Modalita Risposta : $Modalita_Risposta\n"
. "Come ci avete trovato?: $Come_ci_avete_trovato\n";

*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;



//Sending auto respond Email to visitor
$pfw_header = "From: Studio Tecnico Navaldesign"
. "This is an automatic responder. If you need further\n"
. "communication please reply to: myemail@navaldesign.info\n";
$pfw_subject = "Contact Confirmation";
$pfw_email_to = $Email;
$pfw_message = "Thankyou for your submission. Your form data has been submitted.\n"
."This is what we have received: \n"
. ".................................................\ n"
. "Email : $Email\n"
. "Nome : $Nome\n"
. "Cognome : $Cognome\n"
. "Azienda : $Azienda\n"
. "Posizione : $Posizione\n"
. "Indirizzo : $Indirizzo\n"
. "Citta : $Citta\n"
. "Provincia - CAP : $Provincia\n"
. "Nazione : $Nazione\n"
. "Telefono : $Telefono\n"
. "Fax : $Fax\n"
. "Cellulare : $Cellulare\n"
. "Sito Internet : $Sito_Internet\n"
. "Testo di_contatto : $Testo_di_contatto\n"
. "Priorita : $Priorita\n"
. "Modalita Risposta : $Modalita_Risposta\n"
. "Come ci avete trovato?: $Come_ci_avete_trovato\n"


. "If an answer is required we shall get back to you as soon as possible.\n"
. "Navaldesign staff.\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

header("Location: thankyou_page.html");


The field (and the variables names) are in Italian, but i think it is pretty clear

buzzardb
05-21-2006, 06:27 PM
Thanks; The problem is I am terrible with html....Using the form builder, I have set the email as mailto: "my email address". It is sending to me, but I don't know how to get it to email to the customer as well.

navaldesign
05-21-2006, 06:31 PM
You can't do it this way. You can only set an autoresponder with a pre-deternined message through your CP

buzzardb
05-21-2006, 06:40 PM
Sorry for the troubles...I am so new at this....If I am reading you correctly, I have to set my autoresponder to email the details of the form. Do I need to brush up on html language to accomplish this?

navaldesign
05-21-2006, 08:58 PM
In php. You need a php script. Take a tour at Andy's tutorials clicking here (http://netisopen.com/computer/web/webpagestuff.html)