无法在注册时发送电子邮件 (注意:我正在使用Ubuntu) 这是我的.env配置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=cxx2ca6xxxx
MAIL_PASSWORD=44dd3xx402fae
MAIL_ENCRYPTION=ssl
我也已经运行了这些命令 php工匠缓存:清除 php artisan config:clear
Swift_TransportException {#1578 ▼
#message: "Connection could not be established with host [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]"
#code: 0
#file: "/var/www/html/theBowlOne-FleetCart/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php"
#line: 269
trace: {▶}
}
答案 0 :(得分:0)
问题在那里解决。smtp设置来自数据库而不是.env文件。