Fix support of inline src data
This commit is contained in:
parent
9f0eaf58a9
commit
5b22eeab31
@ -84,6 +84,8 @@ if (empty($user->rights->mailing->lire) || (empty($conf->global->EXTERNAL_USERS_
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -124,8 +126,6 @@ if (empty($reshook)) {
|
|||||||
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings');
|
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings');
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
} else {
|
||||||
$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
|
|
||||||
|
|
||||||
if ($object->statut == 0) {
|
if ($object->statut == 0) {
|
||||||
dol_print_error('', 'ErrorMailIsNotValidated');
|
dol_print_error('', 'ErrorMailIsNotValidated');
|
||||||
exit;
|
exit;
|
||||||
@ -318,7 +318,8 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
// Mail making
|
// Mail making
|
||||||
$trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid;
|
$trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid;
|
||||||
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing');
|
$upload_dir_tmp = $upload_dir;
|
||||||
|
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp);
|
||||||
|
|
||||||
if ($mail->error) {
|
if ($mail->error) {
|
||||||
$res = 0;
|
$res = 0;
|
||||||
@ -478,7 +479,8 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$trackid = 'emailing-test';
|
$trackid = 'emailing-test';
|
||||||
$mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing');
|
$upload_dir_tmp = $upload_dir;
|
||||||
|
$mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', '', $upload_dir_tmp);
|
||||||
|
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -1265,8 +1267,9 @@ if ($action == 'create') {
|
|||||||
$out .= '<br></div>';
|
$out .= '<br></div>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$out .= '<span class="opacitymedium">'.$langs->trans("NoAttachedFiles").'</span><br>';
|
//$out .= '<span class="opacitymedium">'.$langs->trans("NoAttachedFiles").'</span><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add link to add file
|
// Add link to add file
|
||||||
$maxfilesizearray = getMaxFileSizeArray();
|
$maxfilesizearray = getMaxFileSizeArray();
|
||||||
$maxmin = $maxfilesizearray['maxmin'];
|
$maxmin = $maxfilesizearray['maxmin'];
|
||||||
|
|||||||
@ -307,7 +307,8 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
// Fabrication du mail
|
// Fabrication du mail
|
||||||
$trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid;
|
$trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid;
|
||||||
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing');
|
$upload_dir_tmp = $upload_dir;
|
||||||
|
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp);
|
||||||
|
|
||||||
if ($mail->error) {
|
if ($mail->error) {
|
||||||
$res = 0;
|
$res = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user