forked from extern/egroupware
If a single attachment fails, continue with the others instead of failing altogether
This commit is contained in:
parent
0eaf00b385
commit
92b7694bae
@ -6759,6 +6759,8 @@ class Mail
|
|||||||
$basedir = $data = '';
|
$basedir = $data = '';
|
||||||
$needTempFile = true;
|
$needTempFile = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
// do not change urls for absolute images (thanks to corvuscorax)
|
// do not change urls for absolute images (thanks to corvuscorax)
|
||||||
if (substr($url, 0, 5) !== 'data:')
|
if (substr($url, 0, 5) !== 'data:')
|
||||||
{
|
{
|
||||||
@ -6849,6 +6851,13 @@ class Mail
|
|||||||
$_html2parse = str_replace($images[0][$i], $images[1][$i].'="'.$cid.'"', $_html2parse);
|
$_html2parse = str_replace($images[0][$i], $images[1][$i].'="'.$cid.'"', $_html2parse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(\Exception $e)
|
||||||
|
{
|
||||||
|
// Something went wrong with this attachment. Skip it.
|
||||||
|
error_log("Error adding inline attachment. " . $e->getMessage());
|
||||||
|
error_log($e->getTraceAsString());
|
||||||
|
}
|
||||||
$attachments [] = array(
|
$attachments [] = array(
|
||||||
'name' => $filename,
|
'name' => $filename,
|
||||||
'type' => $mimeType,
|
'type' => $mimeType,
|
||||||
|
Loading…
Reference in New Issue
Block a user