Class Swift_Transport_Esmtp_Auth_CramMd5Authenticator 不存在

Class Swift_Transport_Esmtp_Auth_CramMd5Authenticator does not exist

在 config/mail.php 中设置正确的配置后,我似乎无法发送带有 laravel 5.4 的电子邮件。我正在使用 smtp 驱动程序,这里是我的文件摘要。
这里是 config/mail.php

<?php
return [
    'driver'=>env('MAIL_DRIVER', 'smtp'),       
    'host'=>env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),
'from' => [
    'address' => env('MAIL_FROM_ADDRESS', 'info@afecamworld.org'),
    'name' => env('MAIL_FROM_NAME', 'National President'),
],
'encryption' => env('MAIL_ENCRYPTION', 'ssl'),
'username' => env('MAIL_USERNAME', 'my-gmail-email'),
'password' => env('MAIL_PASSWORD', 'my-gmail-password'),
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
    'theme' => 'default',
    'paths' => [
        resource_path('views/vendor/mail'),
    ],
],              

这是 SendActivationEmail class

<?php

use Illuminate\Bus\Queueable;                                      
use Illuminate\Notifications\Notification;                                  
use Illuminate\Contracts\Queue\ShouldQueue;                                
use Illuminate\Notifications\Messages\MailMessage;                                    


class SendActivationEmail extends Notification {
    use Queueable;                                                     
    protected $token;                                                  
    public function __construct($token) {
        $this->token = $token;
    }

    public function via($notifiable){
        return ['mail', 'database'];
    }

    public function toMail($notifiable) {
        return (new MailMessage)->subject('Activation Your Account')->greeting('Hello!')->line('You need to activate your email before you can login.')->action('Activate Email', route('activate_account', ['token' => $this->token]))->line('Thank you for joining our Online Community!');
    }
 }      
?>

这是错误的顶部

(1/1) ReflectionException

Class Swift_Transport_Esmtp_Auth_CramMd5Authenticator 不存在 在 DependencyContainer.php(第 309 行)

对于解决 dreamhost 上的此错误的任何帮助,我将不胜感激。

解决这个问题的最好方法是删除vendor文件夹中的文件,然后重做composer install和composer update,这就是我解决问题的方法