我的电子邮件正确发送了主题名称,现在我不知道如何使用简单文本发送电子邮件正文。我现在正在做的事情是发送带有主题名称的空白电子邮件。谁能帮我?
$data = array('title' => 'Forget Password - App', 'content' => 'This is the content of mail body');
Mail::send(['text' => 'view'],$data, function ($message) {
$message->from('fromemail@gmail.com', 'Social Team');
$message->to('randomemail@gmail.com');
$message->subject('App - Forget Password');
});
Run Code Online (Sandbox Code Playgroud)
您可以使用该raw方法在邮件中发送纯文本。这是示例:
Mail::raw('This is the content of mail body', function ($message) {
$message->from('fromemail@gmail.com', 'Social Team');
$message->to('randomemail@gmail.com');
$message->subject('App - Forget Password');
});
Run Code Online (Sandbox Code Playgroud)