我尝试在laravel中创建项目。当我尝试注册时出现此错误: 没有发件人地址就无法发送消息
但是我认为我在.env中配置很好
APP_ENV=local APP_KEY=base64:dO3BVdR/GyA8/4slJWwwTKbbGxE6TqushSnQ/eWzt3o= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=a67607ba6a03b1 MAIL_PASSWORD=148f1b63a2c87f MAIL_ENCRYPTION=tls AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
错误在哪里?而我该如何解决呢?
答案 0 :(得分:0)
在您的.env
中,您需要定义MAIL_FROM_ADDRESS
:
MAIL_FROM_ADDRESS=example@gmail.com
MAIL_FROM_NAME=Name