From 12745ac0ce82e990739091ffc09c514241455231 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 17 Sep 2013 21:02:23 +0000 Subject: [PATCH] Fax to email attachment if the PDF exists attach it to the email however if only the TIF file exists then send it instead of the PDF. --- secure/fax_to_email.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/secure/fax_to_email.php b/secure/fax_to_email.php index d887bd2634..cacf53ec20 100644 --- a/secure/fax_to_email.php +++ b/secure/fax_to_email.php @@ -285,14 +285,14 @@ if (defined('STDIN')) { echo "smtp_from_name: ".$_SESSION['email']['smtp_from_name']['var']."\n"; echo "tmp_subject: $tmp_subject\n"; - //add teh attachments + //add the attachments if (strlen($fax_name) > 0) { - if (!file_exists($dir_fax.'/'.$fax_name.".pdf")) { - $mail->AddAttachment($dir_fax.'/'.$fax_name.'.tif'); // tif attachment - } if (file_exists($dir_fax.'/'.$fax_name.".pdf")) { $mail->AddAttachment($dir_fax.'/'.$fax_name.'.pdf'); // pdf attachment } + else { + $mail->AddAttachment($dir_fax.'/'.$fax_name.'.tif'); // tif attachment + } //$filename='fax.tif'; $encoding = "base64"; $type = "image/tif"; //$mail->AddStringAttachment(base64_decode($strfax),$filename,$encoding,$type); } @@ -359,4 +359,5 @@ if (defined('STDIN')) { //write the contents of the buffer fwrite($fp, $content); fclose($fp); -?> + +?> \ No newline at end of file