Skip to content

Commit

Permalink
improve matching ability for amazon emails that are forwarded
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMassaro committed Dec 22, 2023
1 parent 76adc39 commit e46739e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/email/model/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Message(javax.mail.Message message,
this.fromAddress = sender.getAddress();
this.fromPersonal = sender.getPersonal();
}
if (obfuscateAmazonOrderSubject && this.fromAddress.equalsIgnoreCase("shipment-tracking@amazon.com")) {
if (obfuscateAmazonOrderSubject && (this.fromAddress.equalsIgnoreCase("shipment-tracking@amazon.com") || this.subject.toLowerCase().contains("your amazon.com order of \""))) {
this.subject = subject.replaceAll("\"(.*?)\"", "*****");
}
javax.mail.Address[] recipients = message.getRecipients(javax.mail.Message.RecipientType.TO);
Expand Down

0 comments on commit e46739e

Please sign in to comment.