mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:16:47 +00:00
refactor/remove testMailHogConfig method from CommonsEmailWrapper to clean up unused code
This commit is contained in:
parent
16e74f6089
commit
80d09907c2
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user