[英]Why I am getting view mail not found?
I am trying to send email in Laravel via my post route which has the following code:我正在尝试通过具有以下代码的邮政路线在 Laravel 中发送 email :
Mail::send('mail',['name','Ripon Uddin Arman'],function($message){
$message->to('rislam252@gmail.com')->subject("Email Testing with Laravel");
$message->from('clhg52@gmail.com','Creative Losser Hopeless Genius');
});
When I run the code I get the error:当我运行代码时,我收到错误:
View [mail] not found.
查看 [邮件] 未找到。
I am using use Illuminate\Support\Facades\Mail;
我正在
use Illuminate\Support\Facades\Mail;
If you are looking to send a raw email you can use the raw
method:如果您要发送原始 email 您可以使用
raw
方法:
Mail::raw($content, function ($message) { ... });
If you want to send an HTML email you can use the html
method:如果您想发送 HTML email 您可以使用
html
方法:
Mail::html($htmlContent, function ($message) { ... });
These do not require any view as you are passing the entire message body/part to the method.这些不需要任何视图,因为您将整个消息正文/部分传递给方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.