I've tried this to attach file in storage to a mail:
$attachments = OnlineReply::where('ContactNo', $ContactNo)->first() ;
$HOR_IMG= '/home/sameera/Desktop/sewa/sewa/public/storage/'.$attachments['HOR_IMG'];
$NIC_IMG= '/home/sameera/Desktop/sewa/sewa/public/storage/'.$attachments['NIC_IMG'];
//dd($HOR_IMG,$NIC_IMG);
Mail::send('mail.CRepliesSend',$data, function($message) use ($to_name,$to_email)
{ $message->to($to_email)->subject('reply for your add on mangala sewa');
$message->attach($HOR_IMG);
$message->attach($NIC_IMG);
});
But I get this result:
ErrorException Undefined variable: HOR_IMG
WHat is wrong, and how could I make this work ?