message = $message; $this->service = $service; } /** * @param $subject string * * @return $this */ public function setSubject($subject) { $this->message['subject'] = $subject; return $this; } /** * @param $from string * * @return $this */ public function setFrom($from) { $this->message['from'] = $from; return $this; } /** * @param $to string * * @return $this */ public function setTo($to) { $this->message['to'] = $to; return $this; } /** * @param $body string * * @return $this */ public function setBody($body) { $this->message['body'] = $body; return $this; } /** * @param $attachments array|null * * @return $this */ public function setAttachments($attachments) { $this->message['attachments'] = $attachments; return $this; } /** * @param $type string * * @return $this */ public function setType($type) { $this->message['type'] = $type; return $this; } /** * @return $this */ public function setMessage($message) { $this->message = $message; return $this; } public function setMessageId(string $messageId): self { $this->messageId = $messageId; return $this; } /** * @return string */ public function getSubject() { return $this->message['subject']; } /** * @return string */ public function getFrom() { return $this->message['from']; } /** * @return string */ public function getTo() { return $this->message['to']; } /** * @return string */ public function getBody() { return $this->message['body']; } /** * @return array|null */ public function getAttachments() { return $this->message['attachments']; } /** * @return string */ public function getType() { return $this->message['type']; } /** * @return array */ public function getMessage() { return $this->message; } public function getService(): BaseEmail { return $this->service; } public function getMessageId(): ?string { return $this->messageId; } }