mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:44:37 -04:00
Additional check when sending mails - ensure the to_user exists!
This commit is contained in:
parent
7473f326c0
commit
d8ceb2c68a
@ -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…
x
Reference in New Issue
Block a user