root 5 years ago
parent
commit
4b43bd2b9e
2 changed files with 2 additions and 10 deletions
  1. 2 2
      app/Console/Commands/SendRemindMail.php
  2. 0 8
      app/Jobs/SendEmail.php

+ 2 - 2
app/Console/Commands/SendRemindMail.php

@@ -56,7 +56,7 @@ class SendRemindMail extends Command
                 'template_value' => [
                     'name' => config('v2board.app_name', 'V2Board')
                 ]
-            ]);
+            ])->delay(10);
         }
     }
 
@@ -73,7 +73,7 @@ class SendRemindMail extends Command
                 'template_value' => [
                     'name' => config('v2board.app_name', 'V2Board')
                 ]
-            ]);
+            ])->delay(10);
         }
     }
     

+ 0 - 8
app/Jobs/SendEmail.php

@@ -8,7 +8,6 @@ use Illuminate\Foundation\Bus\Dispatchable;
 use Illuminate\Queue\InteractsWithQueue;
 use Illuminate\Queue\SerializesModels;
 use Illuminate\Support\Facades\Mail;
-use App\Models\MailLog;
 
 class SendEmail implements ShouldQueue
 {
@@ -41,12 +40,5 @@ class SendEmail implements ShouldQueue
                 $message->to($email)->subject($subject); 
             }
         );
-
-        MailLog::create([
-            'email' => $params['email'],
-            'subject' => $params['subject'],
-            'template_name' => $params['template_name'],
-            'error' => count(Mail::failures()) > 0 ? Mail::failures()[0] : NULL
-        ]);
     }
 }