we are using v2.3.0 and have successfully managed to authenticate and send an email. The issue we are having is with email attachments. The code for the attachments is as follows:
$attachment = new FileAttachment();
$attachment->setName($emailAttachment['fileName']);
$attachment->setContentType(mime_content_type($emailAttachment['fileLocation']));
$data = Utils::tryFopen($emailAttachment['fileLocation'], 'r');
$resource = base64_decode($data);
$attachment->setContentBytes(Utils::streamFor($resource));
$this->attachments[] = $attachment;
The issue is the attachments are received as empty files. We have tested with JPG, PNG, PDF and Office files and all are the same result. The attachments look correct in Outlook when received:
However the files are zero bytes when saved to the desktop. We have one log stamp:
PHP Warning: base64_decode() expects parameter 1 to be string, resource given
Any ideas on how to get this working please?

MS Graph needs the data encoded not decoded! Working code: