docs: def SendEmail(self, client_id, message):
      """Processes this event."""
      logging.info(self.logline, client_id, message)
  
      client_info = None
      hostname = None
  
      # Write crash data.
      if data_store.RelationalDBEnabled():
        client = data_store.REL_DB.ReadClientSnapshot(client_id)
        if client is not None:
          client_info = client.startup_info.client_info
          hostname = client.knowledge_base.fqdn
      else:
        client = aff4.FACTORY.Open(client_id, token=self.token)
        client_info = client.Get(client.Schema.CLIENT_INFO)
        hostname = client.Get(client.Schema.FQDN)
  
      crash_details = rdf_client.ClientCrash(
          client_id=client_id,
          client_info=client_info,
          crash_message=message,
          timestamp=int(time.time() * 1e6),
          crash_type="Nanny Message")
  
      WriteAllCrashDetails(client_id, crash_details, token=self.token)
  
      # Also send email.
      if config.CONFIG["Monitoring.alert_email"]:
        url = "/clients/%s" % client_id
        body = self.__class__.mail_template.render(
            client_id=client_id,
            admin_ui=config.CONFIG["AdminUI.url"],
            hostname=utils.SmartUnicode(hostname),
            signature=config.CONFIG["Email.signature"],
            url=url,
            message=utils.SmartUnicode(message))
        email_alerts.EMAIL_ALERTER.SendEmail(
            config.CONFIG["Monitoring.alert_email"],
            "GRR server",
            self.subject % client_id,
            utils.SmartStr(body),
            is_html=True)