diff --git a/web/concrete/src/Mail/Service.php b/web/concrete/src/Mail/Service.php index a6fe41aa91c..96f9a60c336 100644 --- a/web/concrete/src/Mail/Service.php +++ b/web/concrete/src/Mail/Service.php @@ -395,6 +395,8 @@ public function setAdditionalHeaders($headers) * @param bool $resetData Whether or not to reset the service to its default values. * * @throws \Exception + * + * @return bool */ public function sendMail($resetData = true) { @@ -492,10 +494,12 @@ public function sendMail($resetData = true) } $mail->setBody($body); + $sent = false; try { if (Config::get('concrete.email.enabled')) { $transport->send($mail); } + $sent = true; } catch (Exception $e) { if ($this->getTesting()) { throw $e; @@ -533,5 +537,7 @@ public function sendMail($resetData = true) if ($resetData) { $this->reset(); } + + return $sent; } }