File: D:/HostingSpaces/SBogers10/timentessagaantrouwen.nl/app/Mail/sendUserResponseMail.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class sendUserResponseMail extends Mailable
{
use Queueable, SerializesModels;
public $excelPath;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($excelPath)
{
$this->excelPath = storage_path('app/' . $excelPath);
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('mail')
->to('tim@komma.pro')
->attach($this->excelPath);
}
}