mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
test sending booking do to email
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Routing\ResponseFactory;
|
||||
use Illuminate\Support\MessageBag;
|
||||
@@ -348,6 +349,15 @@ class InvoiceController extends Controller
|
||||
$booking->admin_status = 7;
|
||||
$booking->save();
|
||||
|
||||
$do = $this->CIEFToSupplierDO($request, $booking->id);
|
||||
Mail::raw( 'DO for booking no'.$booking->id, function($message) use ($do, $booking){
|
||||
$message->from('info@cief-malaysia.com');
|
||||
$message->to('uldvstar@gmail.com');
|
||||
$message->subject('DO for booking no'.$booking->id);
|
||||
//Attach PDF doc
|
||||
$message->attachData($do,'do_booking_no_'.$booking->id.'.pdf');
|
||||
});
|
||||
|
||||
if(!$booking) {
|
||||
return response()->json(['message' => 'Unable to Complete Booking. Please Approve Again'], 500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user