get('name'); } protected function setSubject($value) { return $this->set('name', $value); } public function addAttachment(\Espo\Entities\Attachment $attachment) { if (!empty($this->id)) { $attachment->set('parentId', $this->id); $attachment->set('parentType', 'Email'); if ($this->entityManager->saveEntity($attachment)) { return true; } } } public function getBodyForSending() { $body = $this->get('body'); if (!empty($body)) { $attachmentList = $this->getInlineAttachments(); foreach ($attachmentList as $attachment) { $body = str_replace("?entryPoint=attachment&id={$attachment->id}", "cid:{$attachment->id}", $body); } } $body = str_replace("