refactor/remove testMailHogConfig method from CommonsEmailWrapper to clean up unused code

This commit is contained in:
hongwei 2025-08-06 17:20:17 +02:00
parent 16e74f6089
commit 80d09907c2

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")
}
}
}