updated moon mailer to record mail sent when it's sent to eve api

This commit is contained in:
2020-01-31 20:20:43 -06:00
parent 606348f5db
commit 026f9b6a1d
2 changed files with 16 additions and 14 deletions
-13
View File
@@ -111,9 +111,6 @@ class MoonMailerCommand extends Command
//Increment the delay for the mail to not hit rate limits
$delay += 30;
//After the mail is dispatched, saved the sent mail record
$this->SaveSentRecord($mail->sender, $mail->subject, $mail->body, $mail->recipient, $mail->recipient_type);
//Update the moon as not being paid for the next month?
foreach($rentals as $rental) {
$previous = new Carbon($rental->Paid_Until);
@@ -138,16 +135,6 @@ class MoonMailerCommand extends Command
]);
}
private function SaveSentRecord($sender, $subject, $body, $recipient, $recipientType) {
$sentmail = new SentMail;
$sentmail->sender = $sender;
$sentmail->subject = $subject;
$sentmail->body = $body;
$sentmail->recipient = $recipient;
$sentmail->recipient_type = $recipientType;
$sentmail->save();
}
private function GetMoonList($moons) {
//Declare the variable to be used as a global part of the function
$list = array();