/**
  * @inheritdoc
  */
 public function toArray()
 {
     return array('mimeType' => $this->entity->getMimeType(), 'encoding' => $this->entity->getEncoding(), 'fileName' => $this->entity->getFileName(), 'contentId' => $this->entity->getContentId(), 'key' => $this->entity->getKey(), 'content' => $this->entity->getAttachmentContent() ? $this->entity->getAttachmentContent()->getContent() : "");
 }
 /**
  * @inheritdoc
  */
 public function addAttachment(\Conjoon\Data\Entity\Mail\AttachmentEntity $attachments)
 {
     $attachments->setMessage($this);
     $this->attachments[] = $attachments;
     return $this;
 }