$builder->
leftJoin('mailLog.order', self::JOIN_ALIAS_ORDER
) ->
leftJoin('mailLog.recipients', self::JOIN_ALIAS_RECIPIENTS
) ->
addSelect([self::JOIN_ALIAS_ORDER, self::JOIN_ALIAS_RECIPIENTS
]);
return $builder;
} private function overrideRecipients(Enlight_Components_Mail
$mail, array
$recipients): Enlight_Components_Mail
{ if (\
count($recipients) > 0
) { $mail->
clearRecipients();
$mail->
addTo(array_column($recipients, 'mailAddress'
));
} return $mail;
}}