简体   繁体   English

Symfony3 FosUserBundle 注册后邮件确认

[英]Symfony3 FosUserBundle mail confirm after registration

After the registration of a new account, I have the following message:注册新帐户后,我收到以下消息:

Un e-mail a été envoyé à l'adresse name@mail.com.给 été envoyé à l'adresse name@mail.com 发送电子邮件。 Il contient un lien d'activation sur lequel il vous faudra cliquer afin d'activer votre compte. Il contient unlien d'activation sur lequel il vous faudra cliquer afin d'activer votre compte.

It means that a mail was send to name@mail.com But when I check, there is no mail.这意味着邮件被发送到 name@mail.com 但是当我检查时,没有邮件。

parameters.yml参数.yml

parameters:
database_host: 127.0.0.1
database_port: null
database_name: dbsym
database_user: root
database_password: ######
mailer_transport: smtp
mailer_host: mail.smtp2go.com
mailer_user: ######
mailer_password: #######
secret: #########

config.yml配置文件

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:
    confirmation:
        enabled: true
        template: '@FOSUser\Registration\email.txt.twig'
    form:
        type: AppBundle\Form\RegistrationType
profile:
    form:
        type: AppBundle\Form\ProfileType

Did I forget something?我忘记了什么吗?

All I have done is type the command in console swiftmailer: email: send in the console to test mail sending and its working.我所做的就是在控制台 swiftmailer 中键入命令:email: send in the console 来测试邮件发送及其工作。 Then I register a new user, I check and see it the mail.然后我注册一个新用户,我检查并查看邮件。

console swiftmailer:email:send ...控制台 swiftmailer:email:send ...

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

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