Skip to content

Commit

Permalink
Do not catch Swift exceptions when submitting forms (see #1017)
Browse files Browse the repository at this point in the history
Description
-----------

Fixes #335

Commits
-------

95d8a7d Do not catch Swift exceptions when submitting forms (see #335)
  • Loading branch information
leofeyer committed Nov 26, 2019
1 parent 2c8419c commit df26058
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core-bundle/src/Resources/contao/forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,7 @@ protected function processFormData($arrSubmitted, $arrLabels, $arrFields)
$email->text = \StringUtil::decodeEntities(trim($message)) . $uploaded . "\n\n";

// Send the e-mail
try
{
$email->sendTo($recipients);
}
catch (\Swift_SwiftException $e)
{
$this->log('Form "' . $this->title . '" could not be sent: ' . $e->getMessage(), __METHOD__, TL_ERROR);
}
$email->sendTo($recipients);
}

// Store the values in the database
Expand Down

0 comments on commit df26058

Please sign in to comment.