{"record":{"id":"0da038038aca6eca","repo":"SonarSource/sonarqube","slug":"email-template-not-found-for-notification","errorCode":null,"errorMessage":"Email template not found for notification: {}","messagePattern":"Email template not found for notification: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java","lineNumber":205,"sourceCode":"      .count();\n  }\n\n  @CheckForNull\n  private User findByLogin(String login) {\n    try (DbSession dbSession = dbClient.openSession(false)) {\n      UserDto dto = dbClient.userDao().selectActiveUserByLogin(dbSession, login);\n      return dto != null ? dto.toUser() : null;\n    }\n  }\n\n  private EmailMessage format(Notification notification) {\n    for (EmailTemplate template : templates) {\n      EmailMessage email = template.format(notification);\n      if (email != null) {\n        return email;\n      }\n    }\n    LOG.warn(\"Email template not found for notification: {}\", notification);\n    return null;\n  }\n\n  boolean deliver(EmailMessage emailMessage) {\n    if (!isActivated()) {\n      LOG.debug(SMTP_HOST_NOT_CONFIGURED_DEBUG_MSG);\n      return false;\n    }\n    try {\n      send(emailMessage);\n      return true;\n    } catch (EmailException e) {\n      LOG.error(\"Unable to send email\", e);\n      return false;\n    }\n  }\n\n  private void send(EmailMessage emailMessage) throws EmailException {","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java#L187-L223","documentation":"Warning (not an exception) logged in EmailNotificationChannel.format when none of the registered EmailTemplate instances recognizes the given Notification and returns an EmailMessage. It means the notification channel has been asked to deliver a notification type it has no template for, so no email is sent and null is returned upstream; the notification's type/key is printed in the {} placeholder.","triggerScenarios":"Thrown at server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register an EmailTemplate that handles the notification type reported in the warning, or verify the plugin providing it is installed and enabled","Check that the notification subtype triggering this event is one supported by the email channel (see EmailNotificationChannel's supported template list)","If the notification is intentionally unsupported, disable that notification subscription for the affected users to stop the warnings"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}