add mms files to mail transfert

This commit is contained in:
osaajani 2021-04-03 18:19:08 +02:00
parent d29424ff0c
commit e06079e6af
5 changed files with 17 additions and 5 deletions

View file

@ -291,12 +291,20 @@ namespace controllers\internals;
}
$mailer = new Mailer();
$attachments = [];
foreach ($received['medias'] ?? [] as $media)
{
$attachments[] = PWD_DATA_PUBLIC . '/' . $media['path'];
}
return $mailer->enqueue($user['email'], EMAIL_TRANSFER_SMS, [
'at' => $received['at'],
'origin' => $received['origin'],
'destination' => $phone['name'],
'text' => $received['text'],
]);
'mms' => $received['mms'] ?? false,
], $attachments);
}
}