mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Send a link if the file is larger than 10 Megabytes
This commit is contained in:
@@ -455,6 +455,19 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
$template_subcategory = 'inbound';
|
||||
}
|
||||
|
||||
//create a new variable for the full file path and name
|
||||
if (!empty($pdf_file) && file_exists($pdf_file)) {
|
||||
$attachment_file = $pdf_file;
|
||||
}
|
||||
else {
|
||||
$attachment_file = $fax_file;
|
||||
}
|
||||
|
||||
//send a link if the file is larger than 10 Megabytes
|
||||
if (filesize($attachment_file) > 10 * 1024 * 1024) {
|
||||
$fax_email_file = 'link';
|
||||
}
|
||||
|
||||
//get the email template from the database
|
||||
if (!empty($domain_uuid)) {
|
||||
$sql = "select template_subject, template_body from v_email_templates ";
|
||||
@@ -510,12 +523,11 @@ if (!function_exists('fax_split_dtmf')) {
|
||||
$email_attachments[0]['type'] = 'file';
|
||||
if (!empty($pdf_file) && file_exists($pdf_file)) {
|
||||
$email_attachments[0]['name'] = $fax_file_name.'.pdf';
|
||||
$email_attachments[0]['value'] = $pdf_file;
|
||||
}
|
||||
else {
|
||||
$email_attachments[0]['name'] = $fax_file_name.'.tif';
|
||||
$email_attachments[0]['value'] = $fax_file;
|
||||
}
|
||||
$email_attachments[0]['value'] = $attachment_file;
|
||||
}
|
||||
|
||||
//send the email
|
||||
|
||||
Reference in New Issue
Block a user