Skip to content
Permalink
Browse files
IGNITE-16829 Support configurable mail smtp host, disabling auth and …
…SSL+ test feature: Fix for email escaping
  • Loading branch information
dspavlov committed Apr 22, 2022
1 parent 10c2b99 commit 21ac94ca7c294ef9cae183702eb880fe0f7724ac
Showing 1 changed file with 3 additions and 1 deletion.
@@ -16,6 +16,7 @@
*/
package org.apache.ignite.ci.web.rest.monitoring;

import com.google.common.base.Strings;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheMetrics;
@@ -138,7 +139,8 @@ public SimpleResult testEmailNotification(@FormParam("address") String address)

ISendEmailConfig email = notifications.email();
String plainText = "Test Email notification message!";
emailSender.sendEmail(address, subj, plainText, plainText, email);
String addressUnescaped = Strings.nullToEmpty(address).replace("%40", "@");
emailSender.sendEmail(addressUnescaped, subj, plainText, plainText, email);
} catch (Exception e) {
return new SimpleResult("Failed to send test Email message: " + e.getMessage());
}

0 comments on commit 21ac94c

Please sign in to comment.