jeudi 12 septembre 2019

Laravel Mail Cannot Attach File

The email will send but the file will not attach. Any ideas?

    public function email_invoice(Request $request, $id){

    $customer = customer::findOrFail($id);

    Mail::send('emails.invoice', ['customer' => $customer], function ($m) use ($customer) {
        $sender_name =  Auth::user()->name;
        $sender_email =  Auth::user()->email;
        $m->from( $sender_email, $sender_name);
        $m->to($customer->email)->subject('Invoice Attached');
        $m->attach('User/myName/invoice.pdf');
    });
}



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Nd5HLY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire