protected function processAttachments(array $attachments)
    {
        $attachments = AttachmentUtils::processAttachments($attachments);

        $processedAttachments = [];
        foreach ($attachments as $name => $attachment) {
            $item = [
                'Name'        => $name,
                'Content'     => base64_encode($this->getAttachmentContent($attachment)),
                'ContentType' => $attachment->getType(),
            ];

            $id = $attachment->getId();
            if (isset($id)) {
                $item['ContentID'] = $id;
            }

            $processedAttachments[] = $item;
        }

        return $processedAttachments;
    }
protected function processAttachments(array $attachments)
    {
        $attachments = AttachmentUtils::processAttachments($attachments);

        $processedAttachments = [];
        foreach ($attachments as $name => $attachment) {
            $item = [
                'Name'        => $name,
                'Content'     => base64_encode($this->getAttachmentContent($attachment)),
                'ContentType' => $attachment->getType(),
            ];

            $id = $attachment->getId();
            if (isset($id)) {
                $item['ContentID'] = $id;
            }

            $processedAttachments[] = $item;
        }

        return $processedAttachments;
    }
@param Attachment[] $attachments

@return array An array containing arrays of the following format:
array(
'Name'                 => name,
'Content'              => base64-encoded content,
'ContentType'          => type,
(optional) 'ContentID' => id,
)