GoncaloF Posted December 1, 2009 Share Posted December 1, 2009 i traying to do a php form with auto replay for both(me and the user who send me a mail), a using this code <?php $contact_name = $_POST['emp']; $contact_email = $_POST['mail']; $contact_subject = $_POST['nomw']; $contact_message = $_POST['tele']; if( $contact_name == true ) { $sender = $contact_email; $receiver = "[email protected]"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "Name: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP: $client_ip \n\n agradecemos o seu intresse no WMC 2010.\n\n para concluir o seu registo utilize o link...."; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?> how i can editt this code to send one copy to me and other to the preson who submited the form?? Link to comment https://forums.phpfreaks.com/topic/183620-noob-question/ Share on other sites More sharing options...
rajivgonsalves Posted December 1, 2009 Share Posted December 1, 2009 you make one more if and change the $receiver to $sender Link to comment https://forums.phpfreaks.com/topic/183620-noob-question/#findComment-969176 Share on other sites More sharing options...
GoncaloF Posted December 2, 2009 Author Share Posted December 2, 2009 and how i can do to make to the mail who send the copy are my mail in this case $receiver ? Link to comment https://forums.phpfreaks.com/topic/183620-noob-question/#findComment-969780 Share on other sites More sharing options...
Ty44ler Posted December 2, 2009 Share Posted December 2, 2009 $receiver = "[email protected], [email protected]"; Link to comment https://forums.phpfreaks.com/topic/183620-noob-question/#findComment-969800 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.