- if ($message = $e->getMessage()) {
- //Add error message mail unreachable
- $form->get('mail')->addError(new FormError($this->translator->trans('Unable to contact: %mail%: %message%', ['%mail%' => $this->config['contact']['mail'], '%message%' => $this->translator->trans($message)])));
- } else {
- //Add error message mail unreachable
- $form->get('mail')->addError(new FormError($this->translator->trans('Unable to contact: %mail%', ['%mail%' => $this->config['contact']['mail']])));
- }
+ //Add error message mail unreachable
+ $form->get('mail')->addError(new FormError($this->translator->trans('Unable to reach account')));