Closed
Description
Description
I use symfony/mailgun and i always get this error:
Connection could not be established with host "ssl://smtp.mailgun.org:465": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
I specify the port in the dsn(my .env file):
###> symfony/mailgun-mailer ###
# MAILER_DSN=mailgun://2b11***394f-18e06deb-0a142a30:sand***8f06b.mailgun.org@default?region=us
MAILER_DSN=mailgun+smtp://postmaster%40sandbox5fa7d0740602***b.mailgun.org:631***[email protected]:587?verify_peer=0
###< symfony/mailgun-mailer ###
But nothing, the port is always 465 but i have to use the 587 as given in my configuration(given by mailgun at the subscription). I think i way to resolve it could be modify directly the SocketStream->initialize()
function but it is not the best way.
Is there a way to set the port in our own files ? Without editing composer files
Example
We can have a think like that?
// config/packages/mailer.yaml
framework:
mailer:
port: 587 // or whatever