Use DOL_DATA_ROOT instead of DOL_DOCUMENT_ROOT for upload_dir_tmp in CMailFile (#34367)

This commit is contained in:
Sébastien NASSIET 2025-06-08 14:29:36 +02:00 committed by GitHub
parent 6202f614a4
commit 58bd0ed0f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,7 +81,7 @@ if ($action == "send") {
$msg = "<html>".$arraydefaultmessage->content."<br>".$receipt."</html>";
$sendto = $email;
$from = $mysoc->email;
$mail = new CMailFile($subject, $sendto, $from, $msg, array(), array(), array(), '', '', 0, 1, '', '', '', '', '', '', DOL_DOCUMENT_ROOT.'/documents/takepos/temp');
$mail = new CMailFile($subject, $sendto, $from, $msg, array(), array(), array(), '', '', 0, 1, '', '', '', '', '', '', DOL_DATA_ROOT.'/documents/takepos/temp');
if ($mail->error || !empty($mail->errors)) {
setEventMessages($mail->error, $mail->errors, 'errors');
} else {