我正在尝试将图像附加到无法显示图像的电子邮件上
此代码通知
return (new MailMessage)
->from(config('mail.username'))
->subject('Reset Password')
->greeting('<img src="http://test.test/img/header/mail_head_en.jpg">')
->line('You are receiving this email because we received a password reset request for your account.')
->line('Your E-mail address ' . ' : ' . $notifiable->email)
->action('Reset Password', route('vendor.password.reset', $this->token . '?email=' . urlencode($notifiable->email)))
->line('If you did not request a password reset, no further action is required.');
但是,不显示图片到电子邮件
答案 0 :(得分:1)
在您的终端或cmd中运行以下命令:
php artisan vendor:publish --tag=laravel-notifications
现在转到第4行的资源/视图/供应商/通知/email.blade.php
更改
{{ $greeting }}
到
{!! $greeting !!}
答案 1 :(得分:0)
将邮件查看文件的greeting
部分从{{ $greeting }}
更改为{!! $greeting !!}