0
votes

I'm trying to connect to smtp server which is located in my local machine. Ping ok, telnet works fine, but from Symfony app i get "Connection could not be established with host .. "

Docker with ubuntu 18. PHP7.3

Below you have my actual configuration, but What i also tried was mixing smtp with ssl/465, tls/587, changing smtp to mail and try with all 3 enc/port configurations, and same thing with sendmail.

None of these worked. I used SwiftMailerLogger, nothing usefull came up, just that connection could not be established. In some configurations i got 'Connection refused' after main message.

My app is placed on docker machine, smtp daemon is in different location on same machine, but i also tried to do all configurations outside docker, still no luck.

Did anyone try to use swiftmailer with local smtp daemon?

My configuration:

mailer_transport: smtp
mailer_host: local_ip
mailer_user: user
mailer_password: pass
mailer_encryption: ssl
mailer_port: 25
1
I would assume this to be a docker issue, and better asked on serverfaultJakumi
@Jakumi i tried to connect from outside docker as well as i described in my question, still no luck, but thanks ;)msobczyk
I'm voting to close this question as off-topic because other users won't be able to have enough information and context to debug a networking issue.yivi
@yivi edited, solved ;)msobczyk
If you've a solution for your case please don't put it inside your question but use the answer section instead.gp_sflover

1 Answers

0
votes

Succeed!

First of all, auth-mode : plain, and :

stream-options:
    ssl:
        allow_self_signed: true
        verify_peer: false

Still using tls and 587 port.