From 0b8c0bb96883bf03f81ec1f75983f7ef6eed6790 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 12 Nov 2020 14:01:47 +0800 Subject: [PATCH] test sending booking do to email --- app/Http/Controllers/InvoiceController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 3f6e6ec0..05564d90 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -367,18 +367,17 @@ class InvoiceController extends Controller $zip->close(); $attachment = base64_encode(File::get($zipname)); -// $do = $this->generateSupplierDo($booking->id); Mail::raw( 'DO for bookings po approved on '.Carbon::today(), function($message) use ($attachment){ $message->from('info@cief-malaysia.com'); $message->to('uldvstar@gmail.com'); $message->subject('DO for bookings on'.Carbon::today()); //Attach PDF doc - $message->attachData($attachment,'do_'.Carbon::today()->format('Y_m_d').'.zip', [ - 'mime' => 'application/pdf', + $message->attachData($attachment, 'do_'.Carbon::today()->format('Y_m_d').'.zip', [ + 'mime' => 'application/zip', ]); }); -// File::delete($zipname); + File::delete($zipname); if(!$booking) { return response()->json(['message' => 'Unable to Complete Booking. Please Approve Again'], 500);