[英]Confirmation email not sent FOSUserBundle Symfony
我刚刚安装了FOSUserbundle,并且希望启用电子邮件确认。 这意味着如果有人注册,用户应该会收到一封带有激活链接的电子邮件。
这是config.yml文件:
fos_user:
db_driver: orm
firewall_name: main
user_class: Project\UserBundle\Entity\User
service:
mailer: fos_user.mailer.twig_swift
group:
group_class: Project\UserBundle\Entity\Group
profile:
form:
type: project_user_profile
registration:
form:
type: project_user_registration
confirmation:
enabled: true
#template: FOSUserBundle:Registration:email.txt.twig
from_email:
address: zairi.ibrahim@gmail.com
sender_name: Simlinx User Registration
和
# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
encryption: %mailer_encryption%
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
spool: { type: memory }
和parameters.yml:
mailer_transport: gmail
mailer_encryption: ssl
mailer_host: ~
mailer_user: zairi.ibrahim
mailer_password: xxxxxxxxxxxx
它是第一次工作,但是现在不再工作了!
Thnks
我有此配置并为我工作。 如果您的配置首次生效,则Gmail可能会阻止您的帐户发送带有symfony的邮件。
配置文件
# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
encryption:%mailer_encryption%
host: %mailer_host%
auth_mode: %mailer_auth_mode% login
username: %mailer_user%
password: %mailer_password%
spool: { type: memory }
和parameters.yml:
mailer_transport: smtp
mailer_encryption: ssl
mailer_host: smtp.gmail.com
mailer_auth_mode: login
mailer_user: zairi.ibrahim@gmail.com
mailer_password: xxxxxxxxxxxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.