2014-04-23 3 views
0

초보자가 PHP를 구사할 수 있었지만이 문제를 해결하고 잘 작동합니다. 그들은 온라인 양식을 작성하는 환자에게 자동 회신 이메일을 보내고 싶습니다. 나는 내가 추가하는 것을 신경 쓰지 않는다. .. 단지 docent는 어떤 의존하는 전자 메일도 센 것으로 보인다. 누군가 나에게 약을 먹기 시작하기 전에 나를 도와주세요. :/ 정말 고마워요.PHP 자동 회신 메일

<?php 
$name = $_POST['name']; 
$email = $_POST['email']; 
$name_of_medication = $_POST['name_of_medication']; 
$strength_dosage = $_POST['strength_dosage']; 
$amount_taken_daily = $_POST['amount_taken_daily']; 
$would_like_a = $_POST['would_like_a']; 
$would_like = $_POST['would_like']; 
$pharmacy_address = $_POST['pharmacy_address']; 
$message = $_POST['message']; //-- all above info to be filled out by patient --// 

$formcontent=" From: $name \n Name of Medication: $name_of_medication \n Strength 
/Dosage: $strength_dosage \n Amount Taken Daily: $amount_taken_daily \n I would like a: 
$would_like_a \n I would like: $would_like \n Pharmacy Name: $pharmacy \n 
     Pharmacy Address: 
$pharmacy_address \n Message/Notes: $message"; 
$recipient = "[email protected]"; 
$subject = "Prescription Request Form"; 
$mailheader = "From: $email \r\n"; 
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); 
echo "Your Prescription Request has been received and will be processed within 48 hours. 
    Thank you!" ; 

//-- all above info to be emailed to our doctor's office --// 

$formcontent2=" From: $name \n Name of Medication: $name_of_medication \n Strength 
/Dosage: $strength_dosage \n Amount Taken Daily: $amount_taken_daily \n 
I would like a: 
$would_like_a \n I would like: $would_like \n Pharmacy Name: $pharmacy \n 
Pharmacy Address: $pharmacy_address \n Message/Notes: $message"; 
$recipient = $_POST['email']; 
$subject = "Prescription Request Form"; 
$mailheader = "[email protected]"; 
mail($_POST['email'], $subject, $formcontent, $mailheader); 

//-- all above info to be auto (auto reply) emailed to patient --// 

?> 

답변

관련 문제