diff --git a/app/Classes/Jobs/Commands/V2/TestAttachingS3FileAndSendEmailV2CommandJob.php b/app/Classes/Jobs/Commands/V2/TestAttachingS3FileAndSendEmailV2CommandJob.php index 9cd1afea..b2b70432 100644 --- a/app/Classes/Jobs/Commands/V2/TestAttachingS3FileAndSendEmailV2CommandJob.php +++ b/app/Classes/Jobs/Commands/V2/TestAttachingS3FileAndSendEmailV2CommandJob.php @@ -68,25 +68,23 @@ class TestAttachingS3FileAndSendEmailV2CommandJob implements ShouldQueue $zip->close(); //STEP 2: Upload the zip file to S3 - $filePathForS3 = 'temp/'.$zip_file; - Storage::disk('s3')->put($filePathForS3, file_get_contents($attachment)); + // $filePathForS3 = 'temp/'.$zip_file; + // Storage::disk('s3')->put($filePathForS3, file_get_contents($attachment)); - Log::info('DownloadBookingDocumentLogic finished processing files to zip count: '.count($bookings)); - $temporaryUrl = Storage::disk('s3')->temporaryUrl( - $filePathForS3, - Carbon::now()->addMinutes(10) - ); - Log::info("[TESTING] total bookings: $temporaryUrl"); + // Log::info('DownloadBookingDocumentLogic finished processing files to zip count: '.count($bookings)); + // $temporaryUrl = Storage::disk('s3')->temporaryUrl( + // $filePathForS3, + // Carbon::now()->addMinutes(10) + // ); + // Log::info("[TESTING] total bookings: $temporaryUrl"); //STEP 3: Send Email - // Mail::raw( "Attention to VT Admin team:\r\n\r\nKindly refer to the attachment for our DAILY DO COMPILATION ".$startDate->format('d-m-Y')." - ".$endDate->format('d-m-Y').".\r\n\r\n**This is an automatically generated email – please do not reply to it. If you have any queries kindly contact our admin team through Wechat.\r\n\r\n\r\nCIEF WORLDWIDE SDN BHD", function($message) use ($attachment, $startDate, $endDate){ - // $message->from('exchange@cief-malaysia.com'); - // $message->to(['vtnation16@gmail.com', 'vtnation@gmail.com', 'atvantic04@gmail.com', 'vtnation2@gmail.com']); - // $message->cc(['shafiqa_sukeri@cief-malaysia.com', 'frontendcief@gmail.com', 'pm@cief-malaysia.com', 'hasan@cief-malaysia.com', 'shipping_admin@cief-malaysia.com', 'hasanakbar27@gmail.com', 'pmwong2019@gmail.com', 'uldvstar@gmail.com']); - // $message->subject('CIEF DO COMPILATION '.$startDate->format('d-m-Y').' - '.$endDate->format('d-m-Y')); - - // $message->attach($attachment); - // }); + Mail::raw( "Attention to VT Admin team:\r\n\r\nKindly refer to the attachment for our DAILY DO COMPILATION ".$startDate->format('d-m-Y')." - ".$endDate->format('d-m-Y').".\r\n\r\n**This is an automatically generated email – please do not reply to it. If you have any queries kindly contact our admin team through Wechat.\r\n\r\n\r\nCIEF WORLDWIDE SDN BHD", function($message) use ($attachment, $startDate, $endDate){ + $message->from('exchange@cief-malaysia.com'); + $message->to(['dillonngoweijoon@gmail.com']); + $message->subject('CIEF DO COMPILATION '.$startDate->format('d-m-Y').' - '.$endDate->format('d-m-Y')); + $message->attach($attachment); + }); File::delete($attachment); Log::info('success');