Additional check when sending mails - ensure the to_user exists!
This commit is contained in:
parent
7473f326c0
commit
d8ceb2c68a
1 changed files with 1 additions and 1 deletions
|
|
@ -224,7 +224,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||
return true;
|
||||
|
||||
/* On the hosted platform we set default contacts a @example.com email address - we shouldn't send emails to these types of addresses */
|
||||
if(Ninja::isHosted() && strpos($this->nmo->to_user->email, '@example.com') !== false)
|
||||
if(Ninja::isHosted() && $this->nmo->to_user && strpos($this->nmo->to_user->email, '@example.com') !== false)
|
||||
return true;
|
||||
|
||||
/* GMail users are uncapped */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue