diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 7cda17e..8412963 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -140,6 +140,12 @@ class MessageProcess implements ShouldQueue // Else we are echomail } else { Log::debug(sprintf('%s:! Looking for echomail area [%s] for mail from [%s]',self::LOGKEY,$this->msg->echoarea,$this->msg->fboss)); + + if (! $this->msg->fboss_o) { + Log::error(sprintf('%s:! Cannot process message for echomail area [%s] for mail from [%s] with msgid [%s] - no boss object?',self::LOGKEY,$this->msg->echoarea,$this->msg->fboss,$this->msg->msgid)); + return; + } + $ea = Echoarea::where('name',strtoupper($this->msg->echoarea)) ->where('domain_id',$this->msg->fboss_o->zone->domain_id) ->single();