Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

Laravel -6 Email with Raw Data

$
0
0

Using Email Body and Attachment at a time

My Code is:

 Mail::send( [],array(), function ($message) use ($fromName,$fromEmail,$receiptEmailSubject,$receiptEmailData,$emilId,$pdf){
            $message->to($emilId)
                    ->from($fromEmail,$fromName)
                    ->subject($receiptEmailSubject)
                    ->setBody($receiptEmailData, 'text/html')
                    ->attachData($pdf->output(), 'receipt.pdf',['mime' => 'application/pdf']);
        });

But unable to use "setBody" and "attachData" as like. (If removed any one email sending works Properly. Need to remove "setBody" OR "attachData")

How to use "setBody" and "attachData" together ?


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>