You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i try to use Symfony Mailer (5.3) on my Web Host Hetzner, where the port 465 is blocked. So i must use the port 587 and i have try it with Sendgrid DSN like MAILER_DSN=sendgrid+smtp://API_KEY@smtp.sendgrid.net:587
and also i have trying from gmail: MAILER_DSN=gmail+smtp://test@gmail.com:password@smtp.gmail.com:587?verify_peer=0
(both also without +smtp, but nothing changed)
Both one produces an Error with the following message: [2021-12-25T09:43:13.271464+01:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Messenger\Exception\HandlerFailedException: "Handling "Symfony\Component\Mailer\Messenger\SendEmailMessage" failed: Connection could not be established with host "ssl://smtp.gmail.com:465": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused)" at /usr/www/users/[username]/[domain]/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php line 80 {"exception":"[object] (Symfony\\Component\\Messenger\\Exception\\HandlerFailedException(code: 0): Handling \"Symfony\\Component\\Mailer\\Messenger\\SendEmailMessage\" failed: Connection could not be established with host \"ssl://smtp.gmail.com:465\": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused) at /usr/www/users/[username]/[domain]/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:80)\n[previous exception] [object] (Symfony\\Component\\Mailer\\Exception\\TransportException(code: 0): Connection could not be established with host \"ssl://smtp.gmail.com:465\": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused) at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:139)"} []
I have also try to use sendgrid+api like: MAILER_DSN=sendgrid+api://API_KEY@default
with produce the error:
request.CRITICAL: Uncaught PHP Exception LogicException: "You cannot use "Symfony\Component\Mailer\Transport\AbstractHttpTransport" as the HttpClient component is not installed. Try running "composer require symfony/http-client"." at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/AbstractHttpTransport.php line 36 {"exception":"[object] (LogicException(code: 0): You cannot use \"Symfony\\Component\\Mailer\\Transport\\AbstractHttpTransport\" as the HttpClient component is not installed. Try running \"composer require symfony/http-client\". at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/AbstractHttpTransport.php:36)"} []
but the Http_Client (5.3.x) is installed via composer.
I have also try to clear the cache various times: APP_ENV=prod APP_DEBUG=0 php bin/console clear:cache
and also delete the /var/cache directory directly on the terminal, nothing helps (always the same error).
I have also open a support ticket on sendgrid, but they have also no idea what's going wrong here. I'm also know that exists a bug in github (see #36224) but I couldn't believe that nobody have this problem in the past.
How i can use now the mailer now btw. how i can change the using port?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Merry Christmas everyone,
i try to use Symfony Mailer (5.3) on my Web Host Hetzner, where the port 465 is blocked. So i must use the port 587 and i have try it with Sendgrid DSN like
MAILER_DSN=sendgrid+smtp://API_KEY@smtp.sendgrid.net:587
and also i have trying from gmail:
MAILER_DSN=gmail+smtp://test@gmail.com:password@smtp.gmail.com:587?verify_peer=0
(both also without +smtp, but nothing changed)
Both one produces an Error with the following message:
[2021-12-25T09:43:13.271464+01:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Messenger\Exception\HandlerFailedException: "Handling "Symfony\Component\Mailer\Messenger\SendEmailMessage" failed: Connection could not be established with host "ssl://smtp.gmail.com:465": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused)" at /usr/www/users/[username]/[domain]/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php line 80 {"exception":"[object] (Symfony\\Component\\Messenger\\Exception\\HandlerFailedException(code: 0): Handling \"Symfony\\Component\\Mailer\\Messenger\\SendEmailMessage\" failed: Connection could not be established with host \"ssl://smtp.gmail.com:465\": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused) at /usr/www/users/[username]/[domain]/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:80)\n[previous exception] [object] (Symfony\\Component\\Mailer\\Exception\\TransportException(code: 0): Connection could not be established with host \"ssl://smtp.gmail.com:465\": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused) at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:139)"} []
I have also try to use sendgrid+api like:
MAILER_DSN=sendgrid+api://API_KEY@default
with produce the error:
request.CRITICAL: Uncaught PHP Exception LogicException: "You cannot use "Symfony\Component\Mailer\Transport\AbstractHttpTransport" as the HttpClient component is not installed. Try running "composer require symfony/http-client"." at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/AbstractHttpTransport.php line 36 {"exception":"[object] (LogicException(code: 0): You cannot use \"Symfony\\Component\\Mailer\\Transport\\AbstractHttpTransport\" as the HttpClient component is not installed. Try running \"composer require symfony/http-client\". at /usr/www/users/[username]/[domain]/vendor/symfony/mailer/Transport/AbstractHttpTransport.php:36)"} []
but the Http_Client (5.3.x) is installed via composer.
I have also try to clear the cache various times:
APP_ENV=prod APP_DEBUG=0 php bin/console clear:cache
and also delete the /var/cache directory directly on the terminal, nothing helps (always the same error).
I have also open a support ticket on sendgrid, but they have also no idea what's going wrong here. I'm also know that exists a bug in github (see #36224) but I couldn't believe that nobody have this problem in the past.
How i can use now the mailer now btw. how i can change the using port?
Beta Was this translation helpful? Give feedback.
All reactions