1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Merge pull request #4873 from turbo124/v5-develop

Gmail fixes.
This commit is contained in:
David Bomba 2021-02-11 18:33:15 +11:00 committed by GitHub
commit a508b8f9ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,13 +65,36 @@ class GmailTransport extends Transport
nlog("trying to attach");
nlog($child->getContentType());
if($child->getContentType() != 'text/plain'){
$this->gmail->attach(TempFile::filePath($child));
nlog($child->getHeaders());
$this->gmail->attach(TempFile::filePath($child));
}
foreach ($message->getChildren() as $child) {
nlog("trying to attach");
if($child->getContentType() != 'text/plain'){
// $attachment = (new Swift_Attachment())
// ->setFilename($child->getHeaders()->get('Content-Type')->getParameter('name'))
// ->setContentType($child->getContentType())
// ->setBody($child->getBody());
$this->gmail->attach(new Swift_Attachment($child));
}
} //todo this should 'just work'
} //todo this should 'just work'
$this->gmail->send();