Compare commits
4 Commits
master
...
email-patc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e654394ec | ||
|
|
cb111a1fa0 | ||
|
|
3c172f8e70 | ||
|
|
408015cc2a |
@ -2,6 +2,7 @@
|
|||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Form\AnonymousComplaintType;
|
use App\Form\AnonymousComplaintType;
|
||||||
|
use Error;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
@ -9,6 +10,7 @@ use Symfony\Component\Yaml\Yaml;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use jv\intranet\Types\NavbarItem;
|
use jv\intranet\Types\NavbarItem;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
use Symfony\Component\HttpClient\Exception\TransportException;
|
||||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||||
use Symfony\Component\Mailer\TransportInterface;
|
use Symfony\Component\Mailer\TransportInterface;
|
||||||
use Symfony\Component\Mailer\MailerInterface;
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
@ -45,10 +47,10 @@ class ComplaintController extends AbstractController
|
|||||||
$email->getHeaders()->addTextHeader('X-Auto-Response-Suppress', 'OOF, DR, RN, NRN, AutoReply'); //Tell autoresponders to not reply
|
$email->getHeaders()->addTextHeader('X-Auto-Response-Suppress', 'OOF, DR, RN, NRN, AutoReply'); //Tell autoresponders to not reply
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$log->debug($mailer->send($email)->toString());
|
$mailer->send($email);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (TransportExceptionInterface $e)
|
catch ( TransportExceptionInterface $e)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<h5 class="alert alert-danger"> Form/email failed to submit with errors. Contact IT </h5>
|
<h5 class="alert alert-danger"> Form/email failed to submit with errors. Contact IT </h5>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user