我刚刚安装了FOSUserbundle,我想启用电子邮件确认。这意味着如果有人注册,用户应该收到一封带有激活链接的电子邮件。
我总是收到以下信息:
FatalErrorException: Error: Maximum execution time of 30 seconds exceeded in 'app'cache'dev'classes.php line 420
这是config.yml文件:
#FOS User Bundle
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: Dbe'DdddBundle'Entity'User
from_email:
address: info@dddd.ch
sender_name: Donaci
registration:
confirmation:
enabled: true # change to true for required email confirmation
可能是什么问题?错误发生在app_dev.php/register/check-email页面上。
提前感谢您的帮助!
编辑:其他功能(如重置)也存在问题。我想问题出在电子邮件上?我在哪里以及如何将其链接?我用的是swift mailer。
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
port: "587"
spool: { type: memory }
如果您在localhost上工作,请尝试将传输设置更改为gmail,并将用户名和密码设置为Google凭据
#app/config/config_dev.yml
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
spool: { type: memory }
encryption: ssl
auth_mode: login
host: smtp.gmail.com
username: yourEmail@gmail.com
password: password_gmail