mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
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:
@@ -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);
|
||||
?>
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user