Problem/Motivation
We discovered that the module did not provide any ability for attachments
Steps to reproduce
we added this code to src/Plugin/Mail/AzureMailer.php
foreach ($message['params']['attachments'] as $attachement) {
$fileContent = base64_encode($attachement['filecontent']);
$attachments[] = [
"name" => $attachement['filename'],
"contentType" => $attachement['filemime'],
"contentInBase64" => $fileContent
];
}
$azureMessage = [
'recipients' => [
'to' => [
[
'address' => $message['to'],
],
],
],
'senderAddress' => $message['from'],
'headers' => $message['headers'],
'replyTo' => [
[
'address' => $message['reply-to'] ?? $message['from'],
],
],
"attachments" => $attachments,
];
We are able to send mails with attachments.
Proposed resolution
Is that something you guys could be implementing?
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
eueco commentedHi there, thank you so much for putting in work with this module.
We are proposing a code improvement, that could make this module send attachments. We wonder, how you feel about this. Is there any reason you haven´t implemented this yet? Otherwise, we suggest to add this to your code, as we were successfully testing this improvement.
Please reach out, if you have any questions.
Thanks & keep up the good work!
Comment #3
eueco commentedComment #4
eueco commentedComment #5
eueco commented