diff --git a/core/modules/contact/src/MessageForm.php b/core/modules/contact/src/MessageForm.php index 1de2b8e..a6976f9 100644 --- a/core/modules/contact/src/MessageForm.php +++ b/core/modules/contact/src/MessageForm.php @@ -217,9 +217,8 @@ public function save(array $form, FormStateInterface $form_state) { if ($message_results[MailHandler::MESSAGE_RECIPIENT]['result']) { drupal_set_message($this->t('Your message has been sent.')); } - else { - drupal_set_message($this->t('Your message has not been sent.'), 'error'); - } + // \Drupal\Core\Mail\MailManager will display an error message, if the + // message couldn't be sent. if (isset($message_results[MailHandler::MESSAGE_COPY])) { if (!$message_results[MailHandler::MESSAGE_COPY]['result']) {