EmailConfirmation with FosUserBundle Does not work

我与影子孤独终老i 提交于 2019-12-24 21:19:11

问题


hello i have been trying to send an email Confirmation since 2 days without success with FOSUSERBUNDLE on symfony 3.4. I know this is a process FosUser makes automatically But i can't make it's work.

this is in my framework.yaml

fos_user:
db_driver: orm
firewall_name: main
user_class: App\Entity\User
registration:
        confirmation:
            enabled: true
from_email:
       address: correo@algo.com
       sender_name: toFront
service:
        mailer: fos_user.mailer.twig_swift

and this is in my .env file

MAILER_URL=smtp://s6.g3tm.com?encryption=ssl&auth_mode=login&username=MYADDRESS&password=*****

i know siwftmailer is working because i can send emails to my account since the sistem.

and when i register a new user, fosuser generate a token and redirect me to /register/check-email but there is nothing in the email of such user

EDIT

this is my swiftmailer conf:

swiftmailer:
transport: smtp
host: localhost
username: correo@algo.com
password: password
port: 585
spool: { type: memory }

what am I wrong?

thanks in advance


回答1:


    swiftmailer:
transport: smtp
host: localhost
username: correo@algo.com
password: password
port: 585
spool: { type: memory }

the port is 587 instead of 585

following your

MAILER_URL=smtp://s6.g3tm.com?encryption=ssl&auth_mode=login&username=MYADDRESS&password=****

Your host as to be s6.g3tm.com not localhost

I don't use symfony 3.4, and I don't know what is the .env file you are using

With your settings, a good configuration could be:

swiftmailer:
    transport: smtp
    host: s6.g3tm.com
    username: correo@algo.com
    password: password
    port: 587
    spool: { type: memory }

SMTP ports are :

  • 25 (normal, insecure)
  • 465 (SSL)
  • 587 (TLS)


来源:https://stackoverflow.com/questions/48251525/emailconfirmation-with-fosuserbundle-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!