新手在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 = "prescription@mydoctor.com";
$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 = "prescription@mydoctor.com";
mail($_POST['email'], $subject, $formcontent, $mailheader);
//-- all above info to be auto (auto reply) emailed to patient --//
?>
答案 0 :(得分:0)
可能会将$ mailheader变量更改为此
$mailheader= "From: prescription@mydoctor.com";