private static function invokeMailHandler($loggable, $level, array &$context) {
        if (!key_exists('mailSubject', $context) || !key_exists('mailMessage', $context))
            self::composeMailMessage($loggable, $level, $context);

        $subject = $context['mailSubject'];
        $message = $context['mailMessage'];

        /** @var ConfigInterface $config */
        $config  = self::di('config');
        $options = $headers = [];
        $sender  = null;

        if (strlen($name = $config->get('log.mail.profile', ''))) {
            $options = $config->get('mail.profile.'.$name, []);
            $sender  = $config->get('mail.profile.'.$name.'.from', null);
            $headers = $config->get('mail.profile.'.$name.'.headers', []);
        }
        static $mailer; !$mailer && $mailer=Mailer::create($options);

        foreach (self::$mailReceivers as $receiver) {
            $mailer->sendMail($sender, $receiver, $subject, $message, $headers);
        }
    }