繁体   English   中英

用户注册后FOSUserBundle 2.0没有确认电子邮件

[英]FOSUserBundle 2.0 no confirmation email after user registration

我使用的是Symfony 3.3和FOSUserBundle 2.0,并且重写了RegistrationControler以使用我自己的用户规范,但是在注册过程中没有什么不同。

当我将true设置为启用确认时,不会发送任何电子邮件,但会使用重置密码!

这是我的config.yml:

# FOSUserBundle
fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: AppBundle\Entity\User
    from_email:
        address: "%mailer_user%"
        sender_name: "%mailer_user%"
    registration:
            form:
                type: AppBundle\Form\RegistrationType
            confirmation:
                enabled: true
    profile:
            form:
                type: AppBundle\Form\ProfileType

不知道发生了什么,有人可以帮忙吗?

在yml文件中,不允许使用制表符,您只需要使用空格即可。 而且我敢肯定,您的“表格”行缩进得太多了。

registration:
    form:
        type: AppBundle\Form\RegistrationType
    confirmation:
        enabled: true
profile:
    form:
        type: AppBundle\Form\ProfileType

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM