Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Swiftmailler through Proxy

$
0
0

In my development env I did this small code to test to send emails.

$message = (new \Swift_Message('Hello Email'))
    ->setFrom('sendTest@mysender.com')
    ->setTo('myEmail@gmail.com')
    ->setBody($this->container->get('twig')->render('emails/test_email.html.twig'),
        'text/html'
    );
$this->mailer->send($message);

It's works well.

My issue is in the Prod environment my server must use a proxy to access to internet.

this is the message I get:

[app] Exception occurred while flushing email queue: Connection could not be established with host **** [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I didn't find the way in Swiftmailler documentation to setup the proxy... someone already do it ? :)

thank you


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>