diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index 01c42789..8ac28a9a 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -58,7 +58,9 @@ class EmailDoToVTCommand extends Command */ public function handle() { + Auth::login(User::findOrFail(1)); + chdir(storage_path()); $zip_file = 'do_from_11_nov_to_23_nov.zip'; $attachment = storage_path().'/'.$zip_file; $zip = new ZipArchive(); @@ -80,7 +82,6 @@ class EmailDoToVTCommand extends Command $zip->close(); - Mail::raw( "Attention to VT Admin team:\r\n\r\nKindly refer to the attachment for our DAILY DO COMPILATION from 12-11-2021 to 23-11-2021.\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){ $message->from('exchange@cief-malaysia.com'); $message->to(['uldvstar@gmail.com']);