mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-21 00:41:34 +02:00
commit
a508b8f9ae
@ -65,13 +65,36 @@ class GmailTransport extends Transport
|
|||||||
nlog("trying to attach");
|
nlog("trying to attach");
|
||||||
nlog($child->getContentType());
|
nlog($child->getContentType());
|
||||||
|
|
||||||
|
|
||||||
if($child->getContentType() != 'text/plain'){
|
if($child->getContentType() != 'text/plain'){
|
||||||
|
|
||||||
|
nlog($child->getHeaders());
|
||||||
|
|
||||||
$this->gmail->attach(TempFile::filePath($child));
|
$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'
|
} //todo this should 'just work'
|
||||||
|
|
||||||
$this->gmail->send();
|
$this->gmail->send();
|
||||||
|
Loading…
Reference in New Issue
Block a user