没有为[mail]定义提示路径-Laravel 5.8中的发送电子邮件问题

时间:2019-06-27 11:11:32

标签: php laravel laravel-5

我是Laravel的初学者。我在我的项目Laravel 5.8中使用了

我有此代码:

$mailTitle = "Masz wiadomość ze strony " . env('APP_NAME');
        $message = "
        <b>Dane wiadomości:</b> $dateTime [IP: $ip]<br/>
        <b>Tytuł wiadomości:</b> $title<br/>
        <b>Imię:</b> $userName<br/>
        <b>Adres email:</b> $userEmail<br/>
        <b>Wiadomość:</b> $txt<br/>";

        $data['slot']= $message;
        $data['adminEmail']= $adminEmail;
        $data['title']= $mailTitle;
        $data['user']= $userEmail;
        Mail::send('vendor.mail.html.message', $data, function($message) use($data) {
            $message->to($data['adminEmail']);
            $message->subject($data['title']);
            $message->replyTo($data['user']);
            $message->from($data['user']);
        });

运行此代码时出现错误:

No hint path defined for [mail]. (View: /var/www/vanessa/resources/views/vendor/mail/html/message.blade.php)

我该如何解决?

1 个答案:

答案 0 :(得分:0)

在此路径中您是否有刀片“ vendor / mail / html / message.blade.php” 您需要制作刀片并在其中设置您的邮件