简体   繁体   English

Swift_TransportException 无法在没有发件人地址的情况下发送消息

[英]Swift_TransportException Cannot send message without a sender address

everyone.每个人。

I use laravel6(v6.18.2), and run php artisan serve我使用 laravel6(v6.18.2),并运行php artisan serve

I tried to send an email with Laravel's default user Authentication.我尝试使用 Laravel 的默认用户身份验证发送电子邮件。 But it gave an error Swift_TransportException Cannot send message without a sender address但它给出了一个错误Swift_TransportException Cannot send message without a sender address

Here is my code :这是我的代码:

//.env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.zoho.com
MAIL_PORT=587
MAIL_USERNAME=blabla
MAIL_PASSWORD=blabla
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=blabla@xxx.xxx
MAIL_FROM_NAME="${APP_NAME}"

//config/mail.php

'from' => [
        'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],

Could anyone please tell me why?谁能告诉我为什么? Thank you.谢谢你。

Clear Cache in Laravel (Terminal)清除 Laravel 中的缓存(终端)

Log in to the system running your Laravel application and open a terminal.登录到运行 Laravel 应用程序的系统并打开一个终端。 Then navigate to your Laravel application code.然后导航到您的 Laravel 应用程序代码。 Here you can issue the commands to clear cache as followings:您可以在此处发出清除缓存的命令,如下所示:

  1. Clear Application Cache清除应用程序缓存

    • Run the following command to clear the application cache of the运行以下命令清除应用程序缓存
    • Laravel application. Laravel 应用程序。
    • php artisan cache:clear php工匠缓存:清除
  2. Clear Route Cache清除路由缓存

    • To clear route cache of your Laravel application execute the following command from the shell.要清除 Laravel 应用程序的路由缓存,请从 shell 执行以下命令。
    • php artisan route:clear php工匠路线:清除
  3. Clear Configuration Cache清除配置缓存

    • You can use config:clear to clear the config cache of the Laravel application.您可以使用 config:clear 清除 Laravel 应用程序的配置缓存。
    • php artisan config:clear php工匠配置:清除
  4. Clear Compiled Views Cache清除编译视图缓存

    • Also, you may need to clear compiled view files of your Laravel application.此外,您可能需要清除 Laravel 应用程序的编译视图文件。 To clear compiled view files run the following command from the terminal.要清除编译的视图文件,请从终端运行以下命令。
    • php artisan view:clear php工匠视图:清除

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

相关问题 文书工作问题 - Swift_TransportException '无法在没有发件人地址的情况下发送消息' - Paperwork issues - Swift_TransportException 'Cannot send message without a sender address' Laravel Homestead Swift 无法在没有发件人地址的情况下发送消息 - Laravel Homestead Swift Cannot send message without a sender address Laravel 5 Swift_TransportException“ 550 5.7.1客户端没有作为该发送者发送的权限” - Laravel 5 Swift_TransportException “550 5.7.1 Client does not have permissions to send as this sender ” 发送YiiMail时发生Swift_TransportException错误 - Error Swift_TransportException when send YiiMail Laravel 6:没有发件人地址无法发送消息 - Laravel 6 : Cannot send message without a sender address laravel 7 无法发送没有发件人地址的消息 - laravel 7 Cannot send message without a sender address 没有发件人地址无法发送邮件 - Cannot send message without a sender address Laravel 8:没有发件人地址无法发送消息 - Laravel 8: Cannot send message without a sender address Laravel中的Swift_TransportException - Swift_TransportException in laravel 获取错误 -> 致命错误:未捕获的异常 'Swift_TransportException' 带有消息 - getting error ->Fatal error: Uncaught exception 'Swift_TransportException' with message
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM