我在这里设置了config.yml:
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: Main\UserBundle\Entity\User
resetting:
email:
from_email:
address: noreply@mmerica.com
sender_name: Mmerica Inc.
当我尝试"重置密码"按钮它会将我发送到一个页面,上面写着电子邮件已发送到.... @ email.com,并且会有一个重置链接。但是,我没有收到任何电子邮件。我应该参考另一个设置吗?
答案 0 :(得分:1)
您必须在config.yml中设置swiftmailer并在parameters.yml
中设置参数config.yml:
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
parameters.yml
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: xxxxxx
database_user: xxxxxx
database_password: xxxxxx
mailer_transport: smtp
mailer_host: "your SMTP server"
mailer_user: "your SMTP user"
mailer_password: "your SMTP user password"
locale: en
secret: ddddddddddddsfcdvfrergfergergergrggergrgregre