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; } } } }