Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Marko Milić 2025-08-07 17:23:00 +02:00
commit b56fd6f7d2
4 changed files with 4 additions and 42 deletions

View File

@ -324,17 +324,6 @@ mail.exception.sender.address=no-reply@example.com
## Recipient addresses for exception notifications (comma-separated)
mail.exception.registered.notification.addresses=notify@example.com,notify2@example.com,notify3@example.com
## Tesobe Mail Server:
## mail.smtp.host=mail.tesobe.com
## mail.smtp.port=25
## mail.smtp.auth=true
## mail.smtp.user=your-email@tesobe.com
## mail.smtp.password=your-password
## mail.smtp.starttls.enable=true
## mail.smtp.ssl.enable=false
## mail.smtp.ssl.protocols=TLSv1.2
## Oauth token timeout
token_expiration_weeks=4

View File

@ -71,7 +71,7 @@ import code.util.{Helper, JsonSchemaUtil}
import code.views.system.AccountAccess
import code.views.{MapperViews, Views}
import code.webuiprops.MappedWebUiPropsProvider.getWebUiPropsValue
import com.alibaba.ttl.internal.javassist.CannotCompileException
import javassist.CannotCompileException
import com.github.dwickern.macros.NameOf.{nameOf, nameOfType}
import com.openbankproject.commons.ExecutionContext.Implicits.global
import com.openbankproject.commons.model._

View File

@ -209,31 +209,4 @@ object CommonsEmailWrapper extends MdcLoggable {
attachment
}
/**
* Test MailHog configuration
*/
def testMailHogConfig(): Unit = {
val config = EmailConfig(
smtpHost = "localhost",
smtpPort = 1025,
username = "",
password = "",
useTLS = false,
debug = true
)
val content = EmailContent(
from = "test@localhost",
to = List("receive@mailhog.local"),
subject = "Test MailHog with Apache Commons Email",
textContent = Some("This is a test email sent to MailHog using Apache Commons Email wrapper.")
)
logger.info("Testing MailHog configuration with Apache Commons Email...")
sendTextEmail(config, content) match {
case Full(messageId) => logger.info(s"MailHog email sent successfully: $messageId")
case Empty => logger.error("Failed to send MailHog email")
}
}
}

View File

@ -381,7 +381,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
APIUtil.getEmailsByUserId(userId) map {
pair =>
val emailContent = CommonsEmailWrapper.EmailContent(
from = "challenge@tesobe.com",
from = mailUsersUserinfoSenderAddress,
to = List(pair._2),
subject = "Challenge",
textContent = Some(s"Your OTP challenge : ${challengeAnswer}")
@ -5188,7 +5188,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
scaMethod match {
case v if v == StrongCustomerAuthentication.EMAIL.toString => // Send the email
val emailContent = CommonsEmailWrapper.EmailContent(
from = "challenge@tesobe.com",
from = mailUsersUserinfoSenderAddress,
to = List(customer.email),
subject = "Challenge request",
textContent = Some(userAuthContextUpdate.challenge)
@ -5215,7 +5215,7 @@ object LocalMappedConnector extends Connector with MdcLoggable {
): OBPReturnType[Box[String]] = {
if (scaMethod == StrongCustomerAuthentication.EMAIL){ // Send the email
val emailContent = CommonsEmailWrapper.EmailContent(
from = "challenge@tesobe.com",
from = mailUsersUserinfoSenderAddress,
to = List(recipient),
subject = "OBP Consent Challenge",
textContent = Some(message)