Skip to content

Commit

Permalink
MOSIP-28575
Browse files Browse the repository at this point in the history
Signed-off-by: Jayesh Kharode <[email protected]>
  • Loading branch information
Jayesh Kharode committed Dec 5, 2023
1 parent 4310e4f commit 8a826a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static List<String> getOtps(){

List<String> 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())
Expand Down Expand Up @@ -112,7 +112,7 @@ public static List<String> 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);
Expand Down

0 comments on commit 8a826a0

Please sign in to comment.