wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits\Sofascore;
|
||||
|
||||
use App\Mail\SofaScoreDataMail;
|
||||
use App\Utilities\Notice;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
trait GrappingMail
|
||||
{
|
||||
public function send(string $folder)
|
||||
{
|
||||
ini_set('memory_limit', -1);
|
||||
|
||||
if ($this->debug) {
|
||||
Notice::note("Mail Excel: $folder", 'b');
|
||||
}
|
||||
|
||||
$files = $this->get_tree($this->data_dir);
|
||||
|
||||
$sendfiles = $this->filter($files, ['xlsx']);
|
||||
|
||||
$header = ucfirst($folder).' '.Carbon::now()->format('Y-m-d');
|
||||
|
||||
Mail::to('hermann.telser@gmail.com')
|
||||
->cc('ubaldo.perrucci@gmail.com')
|
||||
->send(
|
||||
new SofaScoreDataMail($header, $sendfiles)
|
||||
);
|
||||
if ($this->debug) {
|
||||
Notice::note('✉ Mail Send', 'bg');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user