From 63c66602217e7ac1be346804a2815bb67cfc3490 Mon Sep 17 00:00:00 2001 From: Arnab Naha Date: Sat, 27 Aug 2011 19:52:25 +0530 Subject: [PATCH] The batchEmail file changed and now allows batchcom to work and mails be sent from the prescriptions, clinical reminders and batchcom. Automatic notification also works with automatic cron jobs. This modification was done by ZH Healthcare. Signed-off-by: Arnab Naha --- interface/batchcom/batchEmail.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/batchcom/batchEmail.php b/interface/batchcom/batchEmail.php index a3ea7cfc9..46d20e603 100644 --- a/interface/batchcom/batchEmail.php +++ b/interface/batchcom/batchEmail.php @@ -27,19 +27,19 @@ while ($row=sqlFetchArray($res)) { // prepare text for ***NAME*** tag $pt_name=$row['title'].' '.$row['fname'].' '.$row['lname']; $pt_email=$row['email']; - $email_subject=$_POST['email_subject']; + + $email_subject=$_POST['email_subject']; $email_body=$_POST['email_body']; $email_subject=ereg_replace('\*{3}NAME\*{3}', $pt_name, $email_subject ); $email_body= ereg_replace('\*{3}NAME\*{3}', $pt_name, $email_body ); $headers = "MIME-Version: 1.0\r\n"; - $headers .= "To: $pt_name<$pt_email>\r\n"; - $headers .= "From: <$email_sender>\r\n"; - $headers .= "Reply-to: <$email_sender>\r\n"; + $headers .= "To: $pt_name<".$pt_email.">\r\n"; + $headers .= "From: <".$email_sender.">\r\n"; + $headers .= "Reply-to: <".$email_sender.">\r\n"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: PHP mailer\r\n"; - - if ( mail ('',$email_subject,$email_body,$headers)) { + if ( mail($pt_email,$email_subject,$email_body,$headers)) { echo ("
Email sent to $pt_name at $pt_email"); $patient_id=$row['id']; -- 2.11.4.GIT