Skip to content

Commit

Permalink
Updated aliases table view
Browse files Browse the repository at this point in the history
  • Loading branch information
willbrowningme committed Sep 18, 2019
1 parent 5751ade commit aaf08d3
Show file tree
Hide file tree
Showing 7 changed files with 640 additions and 455 deletions.
8 changes: 4 additions & 4 deletions app/Console/Commands/ReceiveEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function handle()
}

// If there is still no user or the user has no verified default recipient then continue.
if (is_null($user) || !$user->hasVerifiedDefaultRecipient()) {
if (!isset($user) || !$user->hasVerifiedDefaultRecipient()) {
continue;
}

Expand Down Expand Up @@ -152,7 +152,7 @@ protected function handleReply($user, $recipient, $displayTo)
if (!is_null($alias) && filter_var($displayTo, FILTER_VALIDATE_EMAIL)) {
$emailData = new EmailData($this->parser);

$message = (new ReplyToEmail($user, $alias, $emailData));
$message = new ReplyToEmail($user, $alias, $emailData);

Mail::to($displayTo)->queue($message);

Expand Down Expand Up @@ -192,7 +192,7 @@ protected function handleForward($user, $recipient, $customDomainId)
->oldest()
->get()
->filter(function ($item, $key) use ($keys) {
return in_array($key+1, $keys) && ! is_null($item['email_verified_at']);
return in_array($key+1, $keys) && !is_null($item['email_verified_at']);
})
->pluck('id')
->take(10)
Expand All @@ -210,7 +210,7 @@ protected function handleForward($user, $recipient, $customDomainId)
$emailData = new EmailData($this->parser);

$alias->verifiedRecipientsOrDefault()->each(function ($recipient) use ($alias, $emailData) {
$message = (new ForwardEmail($alias, $emailData, $recipient->should_encrypt ? $recipient->fingerprint : null));
$message = new ForwardEmail($alias, $emailData, $recipient->should_encrypt ? $recipient->fingerprint : null);

Mail::to($recipient->email)->queue($message);
});
Expand Down
Loading

0 comments on commit aaf08d3

Please sign in to comment.