Skip to content

MX-236: Implement i18N for the messages sent by SMS or Email - #148

Merged
IOhacker merged 1 commit into
openMF:developfrom
IOhacker:develop
Apr 14, 2026
Merged

MX-236: Implement i18N for the messages sent by SMS or Email#148
IOhacker merged 1 commit into
openMF:developfrom
IOhacker:develop

Conversation

@IOhacker

@IOhacker IOhacker commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added configurable email service with custom SMTP settings for flexible email delivery.
    • Email templates now support HTML formatting for improved visual presentation.
  • Chores

    • Refactored email infrastructure to use a plugin-based approach for enhanced maintainability.
    • Updated dependencies and email template design for better consistency.

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@IOhacker has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 34 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 34 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8a638e14-5c46-4504-9ff0-f943313634ce

📥 Commits

Reviewing files that changed from the base of the PR and between 3230085 and b98c919.

📒 Files selected for processing (10)
  • pom.xml
  • src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java
  • src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java
  • src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImpl.java
  • src/main/java/org/apache/fineract/selfservice/registration/starter/SelfRegistrationConfiguration.java
  • src/main/java/org/apache/fineract/selfservice/useradministration/domain/SelfServiceUserDomainServiceImpl.java
  • src/main/resources/i18n/messages.properties
  • src/main/resources/mail-templates/authorization-email.html
  • src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImplTest.java
  • src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImplTest.java
📝 Walkthrough

Walkthrough

This PR introduces a new configurable email service implementation and migrates the self-service registration and password-reset flows from Gmail-backed delivery to this new service. Changes include adding Spring Boot mail support, implementing a primary email service with SMTP configuration, updating service wiring and dependency injection, and modifying the authorization email template.

Changes

Cohort / File(s) Summary
Maven Dependencies
pom.xml
Added compile-scope dependency on org.springframework.boot:spring-boot-starter-mail for SMTP support.
Email Service Implementation
src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java
New @Service implementation of PlatformEmailService (marked @Primary) with runtime SMTP configuration retrieval and dual email sending methods: sendDefinedEmail() for plain-text messages and sendFormattedEmail() for HTML content. Supports welcome emails via sendToUserAccount().
Service Layer Integration
src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImpl.java, src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java
Replaced injected GmailBackedPlatformEmailService with SelfServicePluginEmailService and updated email dispatch calls from sendDefinedEmail() to sendFormattedEmail().
Spring Configuration
src/main/java/org/apache/fineract/selfservice/registration/starter/SelfRegistrationConfiguration.java
Updated bean factory method parameters to inject SelfServicePluginEmailService instead of GmailBackedPlatformEmailService for registration and forgot-password service beans.
Domain Service Qualifier
src/main/java/org/apache/fineract/selfservice/useradministration/domain/SelfServiceUserDomainServiceImpl.java
Added @Qualifier("selfServicePluginEmailService") annotation to constructor parameter to explicitly specify the email service instance.
Email Template
src/main/resources/mail-templates/authorization-email.html
Added Thymeleaf-rendered <title> in document head using email.subject key; removed email.requestId display block from body.
Test Updates
src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImplTest.java, src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImplTest.java
Replaced mocked GmailBackedPlatformEmailService with SelfServicePluginEmailService in mock definitions and constructor wiring; minor formatting cleanup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

⏱️ 10-30 Min Review

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title references i18N implementation for messages sent via SMS or Email, but the changeset primarily adds a new email service implementation and migrates dependencies without demonstrating i18N message handling. Clarify whether i18N message internationalization was actually implemented in the code changes. If i18N is the main objective, provide evidence of message properties files, locale-specific configurations, or translation mechanisms in the changeset.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java (2)

315-316: ⚠️ Potential issue | 🟠 Major

Hardcoded Spanish text not internationalized.

The SMS message (lines 315-316) and email body (lines 329-331) contain hardcoded Spanish text ("Hola", "Código de Autorización"). Given the PR objective is to implement i18N for messages, these should use message resources similar to SelfServiceRegistrationWritePlatformServiceImpl.

Also applies to: 329-331

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java`
around lines 315 - 316, Replace the hardcoded Spanish strings in
SelfServiceForgotPasswordWritePlatformServiceImpl (the SMS `message` and the
email body around the variables used at lines 329-331) with localized message
lookups using the same i18n resource pattern used in
SelfServiceRegistrationWritePlatformServiceImpl (e.g., obtain the
MessageSource/translation utility used there and fetch messages by key,
inserting parameters like firstName and externalAuthorizationToken); update the
keys (e.g., "selfservice.forgotpassword.greeting" and
"selfservice.forgotpassword.authorizationCode") in the resource bundle and use
those keys when constructing the SMS `message` and the email body string.

328-336: ⚠️ Potential issue | 🟠 Major

Plain text body sent as HTML email.

The sendAuthorizationMail method constructs a plain text body (lines 330-331) but calls sendFormattedEmail, which renders the body as HTML (setText(body, true)). This will cause newline characters (\n) to be ignored in email clients, resulting in poorly formatted output.

Either:

  1. Use sendDefinedEmail for plain text, or
  2. Convert the body to HTML format with <br/> tags, or
  3. Use an HTML template as done in SelfServiceRegistrationWritePlatformServiceImpl.
🐛 Proposed fix using sendDefinedEmail for plain text
     private void sendAuthorizationMail(SelfServiceRegistration selfServiceRegistration) {
         final String subject = "Código de Autorización ";
         final String body = "Hola  " + selfServiceRegistration.getFirstName() + ","
                 + "\nCódigo de Autorización : " + selfServiceRegistration.getExternalAuthorizationToken();

         final EmailDetail emailDetail = new EmailDetail(subject, body, selfServiceRegistration.getEmail(),
                 selfServiceRegistration.getFirstName());
-        this.selfServicePluginEmailService.sendFormattedEmail(emailDetail);
+        this.selfServicePluginEmailService.sendDefinedEmail(emailDetail);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java`
around lines 328 - 336, sendAuthorizationMail currently builds a plain-text body
but calls selfServicePluginEmailService.sendFormattedEmail (which treats it as
HTML), causing newlines to be lost; update sendAuthorizationMail to send a
plain-text email by calling selfServicePluginEmailService.sendDefinedEmail (or
otherwise convert the body to HTML with <br/> if you prefer HTML output),
keeping the same subject, recipient and firstName fields and using
selfServiceRegistration.getExternalAuthorizationToken() for the content so
formatting matches intent.
🧹 Nitpick comments (2)
src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java (2)

61-101: Extract common SMTP configuration to reduce duplication.

Both sendFormattedEmail and sendDefinedEmail contain identical JavaMailSender configuration logic (lines 62-87 and 105-130). Extract this into a private helper method.

♻️ Proposed refactor
+    private JavaMailSenderImpl createMailSender() {
+        final SMTPCredentialsData smtpCredentialsData = this.externalServicesReadPlatformService.getSMTPCredentials();
+        final JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
+        mailSender.setHost(smtpCredentialsData.getHost());
+        mailSender.setPort(Integer.parseInt(smtpCredentialsData.getPort()));
+        mailSender.setUsername(smtpCredentialsData.getUsername());
+        mailSender.setPassword(smtpCredentialsData.getPassword());
+
+        Properties props = mailSender.getJavaMailProperties();
+        props.put("mail.transport.protocol", "smtp");
+        props.put("mail.smtp.auth", "true");
+        props.put("mail.smtp.starttls.enable", "true");
+        props.put("mail.smtp.socketFactory.port", Integer.parseInt(smtpCredentialsData.getPort()));
+        props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
+        props.put("mail.smtp.socketFactory.fallback", "true");
+        return mailSender;
+    }
+
+    private String getFromEmail() {
+        return this.externalServicesReadPlatformService.getSMTPCredentials().getFromEmail();
+    }

Also applies to: 103-143

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java`
around lines 61 - 101, Both sendFormattedEmail and sendDefinedEmail duplicate
the JavaMailSenderImpl configuration; extract that logic into a private helper
such as private JavaMailSenderImpl createMailSender(SMTPCredentialsData
smtpCredentialsData) that sets host, port, username, password and the JavaMail
properties (mail.transport.protocol, mail.smtp.auth, mail.debug,
mail.smtp.starttls.enable, socketFactory.* etc.) and returns the configured
JavaMailSenderImpl; replace the duplicated blocks in sendFormattedEmail and
sendDefinedEmail with calls to
createMailSender(this.externalServicesReadPlatformService.getSMTPCredentials())
and use the returned mailSender as before (keep exception handling and message
setup unchanged).

46-59: Missing Javadoc on public methods.

Public methods sendToUserAccount, sendFormattedEmail, and sendDefinedEmail lack Javadoc documentation. As per coding guidelines, public methods and classes must have Javadoc.

Also applies to: 61-101, 103-143

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java`
around lines 46 - 59, Add Javadoc comments for the public methods
sendToUserAccount, sendFormattedEmail, and sendDefinedEmail and for the class
itself: document each method’s purpose, list all parameters with `@param`
(organisationName, contactName, address, username, unencodedPassword for
sendToUserAccount, and the EmailDetail parameter for sendDefinedEmail), describe
return behavior (void) and any exceptions thrown with `@throws` if applicable, and
include a short class-level Javadoc describing the service responsibility;
ensure the Javadoc is concise and follows project style conventions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java`:
- Line 79: The mail.debug property is hardcoded to "true" in
SelfServicePluginEmailService (props.put("mail.debug", "true")) which exposes
verbose SMTP logs; change this to be configurable or disabled by default by
reading a configuration flag (e.g., from environment, application properties, or
an injected Config/Properties bean) and only set props.put("mail.debug", value)
when the configured value is true, otherwise omit the property or set it to
"false"; update all occurrences (including the second instance) to use the same
config-backed approach so production does not emit debug SMTP logs.
- Line 69: The code calls
mailSender.setPort(Integer.parseInt(smtpCredentialsData.getPort())) without
validating the port string; wrap parsing in validation/handling (e.g., check
smtpCredentialsData.getPort() for null/empty, then parse inside a try/catch for
NumberFormatException) and either use a sensible default (587) or rethrow a
clear IllegalArgumentException if invalid, then pass the parsed int to
mailSender.setPort; apply the same fix wherever smtpCredentialsData.getPort() is
parsed (the other occurrences around the setPort calls).

In
`@src/main/java/org/apache/fineract/selfservice/useradministration/domain/SelfServiceUserDomainServiceImpl.java`:
- Around line 37-39: The SelfServiceUserDomainServiceImpl constructor currently
requires an unconditional `@Qualifier`("selfServicePluginEmailService")
PlatformEmailService which will fail when
mifos.self.service.plugin.email.enabled is false; modify the constructor to
accept Optional<PlatformEmailService> (with the same qualifier) or mark the
whole class with
`@ConditionalOnProperty`(name="mifos.self.service.plugin.email.enabled",
havingValue="true") so the bean is only loaded when the plugin email bean
exists; update internal field(s) that reference the email service in
SelfServiceUserDomainServiceImpl to handle Optional.empty() (or assume presence
when using the conditional) and keep existing constructor parameters
AppSelfServiceUserRepository and PlatformPasswordEncoder unchanged.

---

Outside diff comments:
In
`@src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java`:
- Around line 315-316: Replace the hardcoded Spanish strings in
SelfServiceForgotPasswordWritePlatformServiceImpl (the SMS `message` and the
email body around the variables used at lines 329-331) with localized message
lookups using the same i18n resource pattern used in
SelfServiceRegistrationWritePlatformServiceImpl (e.g., obtain the
MessageSource/translation utility used there and fetch messages by key,
inserting parameters like firstName and externalAuthorizationToken); update the
keys (e.g., "selfservice.forgotpassword.greeting" and
"selfservice.forgotpassword.authorizationCode") in the resource bundle and use
those keys when constructing the SMS `message` and the email body string.
- Around line 328-336: sendAuthorizationMail currently builds a plain-text body
but calls selfServicePluginEmailService.sendFormattedEmail (which treats it as
HTML), causing newlines to be lost; update sendAuthorizationMail to send a
plain-text email by calling selfServicePluginEmailService.sendDefinedEmail (or
otherwise convert the body to HTML with <br/> if you prefer HTML output),
keeping the same subject, recipient and firstName fields and using
selfServiceRegistration.getExternalAuthorizationToken() for the content so
formatting matches intent.

---

Nitpick comments:
In
`@src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java`:
- Around line 61-101: Both sendFormattedEmail and sendDefinedEmail duplicate the
JavaMailSenderImpl configuration; extract that logic into a private helper such
as private JavaMailSenderImpl createMailSender(SMTPCredentialsData
smtpCredentialsData) that sets host, port, username, password and the JavaMail
properties (mail.transport.protocol, mail.smtp.auth, mail.debug,
mail.smtp.starttls.enable, socketFactory.* etc.) and returns the configured
JavaMailSenderImpl; replace the duplicated blocks in sendFormattedEmail and
sendDefinedEmail with calls to
createMailSender(this.externalServicesReadPlatformService.getSMTPCredentials())
and use the returned mailSender as before (keep exception handling and message
setup unchanged).
- Around line 46-59: Add Javadoc comments for the public methods
sendToUserAccount, sendFormattedEmail, and sendDefinedEmail and for the class
itself: document each method’s purpose, list all parameters with `@param`
(organisationName, contactName, address, username, unencodedPassword for
sendToUserAccount, and the EmailDetail parameter for sendDefinedEmail), describe
return behavior (void) and any exceptions thrown with `@throws` if applicable, and
include a short class-level Javadoc describing the service responsibility;
ensure the Javadoc is concise and follows project style conventions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be8d6d07-cc41-4cbc-bb34-e0eae2e36fd4

📥 Commits

Reviewing files that changed from the base of the PR and between 5d631c4 and 3230085.

📒 Files selected for processing (9)
  • pom.xml
  • src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java
  • src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImpl.java
  • src/main/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImpl.java
  • src/main/java/org/apache/fineract/selfservice/registration/starter/SelfRegistrationConfiguration.java
  • src/main/java/org/apache/fineract/selfservice/useradministration/domain/SelfServiceUserDomainServiceImpl.java
  • src/main/resources/mail-templates/authorization-email.html
  • src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceForgotPasswordWritePlatformServiceImplTest.java
  • src/test/java/org/apache/fineract/selfservice/registration/service/SelfServiceRegistrationWritePlatformServiceImplTest.java

Properties props = mailSender.getJavaMailProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.auth", "true");
props.put("mail.debug", "true");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove or externalize mail.debug=true setting.

Hardcoded mail.debug=true will produce verbose SMTP protocol logs in production, potentially exposing sensitive information and impacting performance. This should be configurable or disabled by default.

🔧 Proposed fix
-        props.put("mail.debug", "true");
+        // Enable only for troubleshooting; consider externalizing this setting

Also applies to: 122-122

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/infrastructure/core/service/SelfServicePluginEmailService.java`
at line 79, The mail.debug property is hardcoded to "true" in
SelfServicePluginEmailService (props.put("mail.debug", "true")) which exposes
verbose SMTP logs; change this to be configurable or disabled by default by
reading a configuration flag (e.g., from environment, application properties, or
an injected Config/Properties bean) and only set props.put("mail.debug", value)
when the configured value is true, otherwise omit the property or set it to
"false"; update all occurrences (including the second instance) to use the same
config-backed approach so production does not emit debug SMTP logs.

Comment on lines +37 to +39
public SelfServiceUserDomainServiceImpl(final AppSelfServiceUserRepository userRepository,
final PlatformPasswordEncoder applicationPasswordEncoder,
@Qualifier("selfServicePluginEmailService")final PlatformEmailService emailService) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for other PlatformEmailService implementations that might serve as fallback
ast-grep --pattern 'class $_ implements PlatformEmailService'

Repository: openMF/selfservice-plugin

Length of output: 51


🏁 Script executed:

# Find SelfServicePluginEmailService and check its `@ConditionalOnProperty` annotation
fd -t f "SelfServicePluginEmailService.java" -exec cat -n {} \;

Repository: openMF/selfservice-plugin

Length of output: 299


🏁 Script executed:

# Search for `@ConditionalOnProperty` patterns in the codebase
rg "@ConditionalOnProperty" -A 3

Repository: openMF/selfservice-plugin

Length of output: 1946


🏁 Script executed:

# Search for all PlatformEmailService references
rg "PlatformEmailService" -B 2 -A 2

Repository: openMF/selfservice-plugin

Length of output: 3300


🏁 Script executed:

# Check if SelfServiceUserDomainServiceImpl has any conditional configuration
fd -t f "SelfServiceUserDomainServiceImpl.java" -exec cat -n {} \;

Repository: openMF/selfservice-plugin

Length of output: 299


🏁 Script executed:

# Search for other PlatformEmailService implementations (not using ast-grep which failed)
rg "implements PlatformEmailService" -B 5

Repository: openMF/selfservice-plugin

Length of output: 888


🏁 Script executed:

# Check if SelfServiceUserDomainServiceImpl is conditionally loaded
rg "class SelfServiceUserDomainServiceImpl" -B 10 | head -30

Repository: openMF/selfservice-plugin

Length of output: 1777


🏁 Script executed:

# Check if Optional<PlatformEmailService> pattern is used anywhere
rg "Optional.*PlatformEmailService"

Repository: openMF/selfservice-plugin

Length of output: 51


🏁 Script executed:

# Verify if there's a default PlatformEmailService bean defined in config
rg "PlatformEmailService" --type java | grep -E "(Bean|@Component|@Service)" | head -20

Repository: openMF/selfservice-plugin

Length of output: 51


SelfServiceUserDomainServiceImpl requires the conditional SelfServicePluginEmailService bean, which will cause startup failure if mifos.self.service.plugin.email.enabled is false or not set.

The class is unconditionally loaded as a @Service, but its constructor dependency on @Qualifier("selfServicePluginEmailService") PlatformEmailService requires a bean that only exists when the property is set to true. When the property is false or absent, Spring will fail to resolve the dependency and application startup will fail.

Either:

  1. Make SelfServiceUserDomainServiceImpl conditionally loaded to match its dependency, or
  2. Use Optional<PlatformEmailService> to handle the missing bean gracefully, or
  3. Ensure the property is always set to true in all active profiles.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/org/apache/fineract/selfservice/useradministration/domain/SelfServiceUserDomainServiceImpl.java`
around lines 37 - 39, The SelfServiceUserDomainServiceImpl constructor currently
requires an unconditional `@Qualifier`("selfServicePluginEmailService")
PlatformEmailService which will fail when
mifos.self.service.plugin.email.enabled is false; modify the constructor to
accept Optional<PlatformEmailService> (with the same qualifier) or mark the
whole class with
`@ConditionalOnProperty`(name="mifos.self.service.plugin.email.enabled",
havingValue="true") so the bean is only loaded when the plugin email bean
exists; update internal field(s) that reference the email service in
SelfServiceUserDomainServiceImpl to handle Optional.empty() (or assume presence
when using the conditional) and keep existing constructor parameters
AppSelfServiceUserRepository and PlatformPasswordEncoder unchanged.

@IOhacker
IOhacker merged commit 1744484 into openMF:develop Apr 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant