{"record":{"id":"ff9df09e1a07f2d5","repo":"theonedev/onedev","slug":"no-account-found-with-verified-email-address","errorCode":null,"errorMessage":"No account found with verified email address: ","messagePattern":"No account found with verified email address: ","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/mail/DefaultMailService.java","lineNumber":557,"sourceCode":"\n\t\t\t\t\t\t\t\t\t\t\tString template = StringUtils.join(settingService.getEmailTemplates().getPullRequestNotificationUnsubscribed(), \"\\n\");\n\t\t\t\t\t\t\t\t\t\t\tMap<String, Object> bindings = new HashMap<>();\n\t\t\t\t\t\t\t\t\t\t\tbindings.put(\"pullRequest\", involvedPullRequest);\n\t\t\t\t\t\t\t\t\t\t\tString htmlBody = EmailTemplates.evalTemplate(true, template, bindings);\n\t\t\t\t\t\t\t\t\t\t\tString textBody = EmailTemplates.evalTemplate(false, template, bindings);\n\t\t\t\t\t\t\t\t\t\t\tvar threadingReferences = getThreadingReferences(UUID.randomUUID().toString(), getMessageId(message));\n\t\t\t\t\t\t\t\t\t\t\tsendMailAsync(newArrayList(fromInternetAddress.getAddress()), newArrayList(), newArrayList(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tsubject, htmlBody, textBody, null, null, threadingReferences);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif (!SecurityUtils.canReadCode(involvedPullRequest.getProject())) {\n\t\t\t\t\t\t\t\t\t\t\t\taddComment(involvedPullRequest, message, fromInternetAddress, fromUser, receiverInternetAddresses);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new UnauthorizedException(\"Code read permission required for project: %s\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ involvedPullRequest.getProject().getPath());\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"No account found with verified email address: \" + fromInternetAddress.getAddress());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthrow new ExplicitException(\"Invalid recipient address: \" + parsedReceiverAddress);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.warn(\"Ignored recipient '\" + parsedReceiverAddress + \"' as issue or pull request is processed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!receiverInternetAddress.equals(fromInternetAddress)) {\n\t\t\t\t\t\tinvolvedInternetAddresses.add(receiverInternetAddress);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (involvedIssue != null) {\n\t\t\t\t\t\tfor (InternetAddress involvedInternetAddress : involvedInternetAddresses) {\n\t\t\t\t\t\t\tEmailAddress involvedAddressEntity = emailAddressService.findByValue(involvedInternetAddress.getAddress());\n\t\t\t\t\t\t\tif (involvedAddressEntity != null && involvedAddressEntity.isVerified()) {\n\t\t\t\t\t\t\t\tvar involvedUser = involvedAddressEntity.getOwner();\n\t\t\t\t\t\t\t\tif (SecurityUtils.canAccessProject(involvedUser.asSubject(), involvedIssue.getProject())) {","sourceCodeStart":539,"sourceCodeEnd":575,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/mail/DefaultMailService.java#L539-L575","documentation":"OneDev's inbound mail handler processes reply-to emails by matching the sender's address to a OneDev account. When the 'from' address does not correspond to any account that has that email address marked as verified, an ExplicitException is thrown so the mail is rejected with a clear reason instead of being silently attributed to the wrong user.","triggerScenarios":"An email is sent to a project/issue/pull request mail address; the from address's account lookup by verified email returns null (no account, unverified email, or address mismatch e.g. plus-addressing or different case/domain).","commonSituations":"Replying to issue notifications from a personal email alias not registered in OneDev; a user registered with a different email than their mail client sends from; email verification never completed; corporate relay rewriting the From address.","solutions":["Ensure the sending user has an OneDev account and that the email used is added to the account and marked verified","Check mail handler settings to confirm which addresses/domains are allowed to post via email","Reply from the exact address registered in the OneDev profile","If the sender should not post via email, ignore the bounce; configure issue/pull mail addresses to only accept from known users"],"exampleFix":"// before: replying from unregistered alias\ndev+bts@corp.example -> posts to issue\n// after: add dev+bts@corp.example to the OneDev account and verify it, or reply from the primary registered address","handlingStrategy":"try-catch","validationCode":"boolean canPost = OneDev.getInstance(UserManager.class).findByEmail(fromAddress) != null;","typeGuard":"boolean hasVerifiedEmail(Account a, String addr) { return a != null && a.getEmails().stream().anyMatch(e -> e.getValue().equals(addr) && e.isVerified()); }","tryCatchPattern":"try { mailHandler.handleMessage(message); } catch (ExplicitException e) { log.warn(\"Mail rejected: \" + e.getMessage()); }","preventionTips":["Keep account emails verified and unique","Reply from the registered primary address","Avoid plus-addressing/aliases not registered in OneDev"],"tags":["email","authentication","mail-handler"],"backgroundTag":"user-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}