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.

This commit is contained in:
Mark Crane
2013-09-17 21:02:23 +00:00
parent b787d19b7e
commit 12745ac0ce

View File

@@ -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);
?>
?>