类Swift_Transport_Esmtp_Auth_CramMd5Authenticator不存在
问题描述:
在config/mail.php中设置正确的配置后,我似乎无法发送带有laravel 5.4的邮件。我在这里使用smtp驱动程序是我的文件的摘要。
这里是配置/ mail.php类Swift_Transport_Esmtp_Auth_CramMd5Authenticator不存在
<?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', '[email protected]'),
'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类
<?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
类Swift_Transport_Esmtp_Auth_CramMd5Authenticator不存在 DependencyContainer.php(309行)
我将不胜感激任何帮助解决Dreamhost的这个错误,谢谢。
答
来解决这个问题的最好办法是删除文件在供应商文件夹,并重新安装作曲家和作曲家更新,这就是我如何固定我的问题
我需要尽快帮助,谢谢。 – wadleo