问题描述
您好,我一直在尝试从2天开始发送电子邮件确认,而没有成功的Symfony 3.4.我知道这是Fosuser自动进行的过程,但我无法使其正常工作.
这是在我的框架中.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
这在我的.env文件中
MAILER_URL=smtp://s6.g3tm.com?encryption=ssl&auth_mode=login&username=MYADDRESS&password=*****
我知道Siwftmailer正在工作,因为我可以从SISTEM发送电子邮件到我的帐户.
当我注册新用户时,fosuser会生成一个令牌,然后将我重定向到/注册/check-email,但是此类用户的电子邮件中没有什么都没有
编辑
这是我的SwiftMailer Conf:
swiftmailer: transport: smtp host: localhost username: correo@algo.com password: password port: 585 spool: { type: memory }
我错了什么?
预先感谢
推荐答案
swiftmailer: transport: smtp host: localhost username: correo@algo.com password: password port: 585 spool: { type: memory }
端口为587,而不是585
遵循您的
MAILER_URL=smtp://s6.g3tm.com?encryption=ssl&auth_mode=login&username=MYADDRESS&password=****
您的主机为 s6.g3tm.com 不是localhost
我不使用Symfony 3.4,我不知道您正在使用的.env文件是什么
使用您的设置,可以是:
swiftmailer: transport: smtp host: s6.g3tm.com username: correo@algo.com password: password port: 587 spool: { type: memory }
SMTP端口是:
- 25(正常,不安全)
- 465(SSL)
- 587(TLS)
问题描述
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
推荐答案
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)