php-ews
php-ews copied to clipboard
Inline Attachements
Hi,
sending Mails with attachments now works perfect, but not with InlineAttachments ;-(
Supposed i have '<img src="cid:picture1.jpg">' within my body and want to create an inlineAttachment? Where can i set, that the attachment withing the createAttachment method?
Is this ok?
$api->getClient()->CreateAttachment(array (
'ParentItemId' => $mailId->toArray(),
'Attachments' => array (
'FileAttachment' => array (
'Name' => 'picture1.jpg',
'Content' => file_get_contents('picture1.jpg'),
'isInline' => '1'
)
),
));
Best regards
Daniel
it seems that an html code has been filtered out at text Position 'Supposed i have '' . Between the brackets 'img src=cid:picture1.jpg' is missing.
For that you should wrap it in `'s, like you would with code