From 8a826a05e430d51ba98d4da48c5f143242377a75 Mon Sep 17 00:00:00 2001 From: Jayesh Kharode Date: Tue, 5 Dec 2023 16:39:42 +0530 Subject: [PATCH] MOSIP-28575 Signed-off-by: Jayesh Kharode --- .../io/mosip/testrig/dslrig/dataprovider/util/ReadEmail.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/util/ReadEmail.java b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/util/ReadEmail.java index 8cc78f5b..6da335b6 100644 --- a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/util/ReadEmail.java +++ b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/util/ReadEmail.java @@ -45,7 +45,7 @@ public static List getOtps(){ List mails = receiveEmail(gmailPOPHost, mailStoreType, username, password); for(String s: mails) { - logger.info("S=={}" ,s); + Pattern pattern = Pattern.compile(regexpattern); Matcher matcher = pattern.matcher(s); if (matcher.find()) @@ -112,7 +112,7 @@ public static List receiveEmail(String pop3Host, String storeType, logger.info("From: " + message.getFrom()[0]); MimeMultipart content = (MimeMultipart) message.getContent(); String bodyMsg = getTextFromMimeMultipart(content); - logger.info("Body Message: {}" , bodyMsg); + if (message.getFrom()[0].toString().toLowerCase().contains("mosip")) { mailMessage.add(bodyMsg); message.setFlag(Flags.Flag.DELETED, true);