mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
add mms files to mail transfert
This commit is contained in:
parent
d29424ff0c
commit
e06079e6af
5 changed files with 17 additions and 5 deletions
|
@ -101,10 +101,11 @@ class Mailer extends \descartes\Controller
|
|||
* @param string $destination : email address to send email to
|
||||
* @param array $settings : Email settings
|
||||
* @param array $data : Data to inject into email template
|
||||
* @param array $attachments : List of paths of files to attach to the mail
|
||||
*
|
||||
* @return bool : true on success, false on error
|
||||
*/
|
||||
public function enqueue(string $destination, array $settings, array $data): bool
|
||||
public function enqueue(string $destination, array $settings, array $data, array $attachments = []): bool
|
||||
{
|
||||
$response = $this->generate_body($settings, $data);
|
||||
|
||||
|
@ -113,6 +114,7 @@ class Mailer extends \descartes\Controller
|
|||
'subject' => $settings['subject'],
|
||||
'body' => $response['body'],
|
||||
'alt_body' => $response['alt_body'],
|
||||
'attachments' => $attachments,
|
||||
];
|
||||
|
||||
$error_code = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue