public function send(string $from_name = MAIL["from_name"], string $from_email = MAIL["from_email"]): bool { try { $this->mail->Subject = $this->data->subject; $this->mail->msgHTML($this->data->body); $this->mail->addAddress($this->data->recipient_email, $this->data->recipient_name); $this->mail->setFrom($from_email, $from_name); if (!empty($this->data->addReplyTo)) { $this->mail->addReplyTo($this->data->addReplyTo); } if (!empty($this->data->attach)) { foreach ($this->data->attach as $path => $name) { $this->mail->addAttachment($path, $name); } } $this->mail->send(); return true; } catch (Exception $exception) { $this->error = $exception; return false; } }