mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
throw error message on test email config failure (#15311)
This commit is contained in:
parent
a499c3e36a
commit
3adc1e5d9e
@ -274,7 +274,7 @@ public class EmailUtil {
|
||||
}
|
||||
|
||||
public static void sendMail(Email email, boolean async) {
|
||||
if (mailer != null && getSmtpSettings().getEnableSmtpServer()) {
|
||||
if (Boolean.TRUE.equals(getSmtpSettings().getEnableSmtpServer()) && mailer != null) {
|
||||
mailer.sendMail(email, async);
|
||||
} else {
|
||||
LOG.error("Mailer is not initialized or Smtp is not Enabled.");
|
||||
@ -384,7 +384,11 @@ public class EmailUtil {
|
||||
}
|
||||
|
||||
public static void testConnection() {
|
||||
mailer.testConnection();
|
||||
if (Boolean.TRUE.equals(getSmtpSettings().getEnableSmtpServer()) && mailer != null) {
|
||||
mailer.testConnection();
|
||||
} else {
|
||||
LOG.error("Mailer is not initialized or Smtp is not Enabled.");
|
||||
}
|
||||
}
|
||||
|
||||
private static String getEmailVerificationSubject() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user