Changed announceEmail.pl to strip out things like order numbers
authorAndrew DeFaria <Andrew@DeFaria.com>
Sun, 11 Jul 2021 20:49:13 +0000 (13:49 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Sun, 11 Jul 2021 20:49:13 +0000 (13:49 -0700)
bin/announceEmail.pl

index 96da982..906b22a 100755 (executable)
@@ -125,6 +125,8 @@ sub notify($) {
   my $cmd = "notify-send -i $icon -t $timeout '$msg'";
 
   Execute $cmd;
+
+  return;
 } # notify
 
 sub interrupted {
@@ -235,6 +237,10 @@ sub MonitorMail() {
     # Google Talk doesn't like #
     $subject =~ s/\#//g;
 
+    # Remove long strings of numbers like order numbers. They are uninteresting
+    my $longNumber = 5;
+    $subject =~ s/\s+\S*\d{$longNumber,}\S*\s*//g;
+
     # Now speak it!
     my $logmsg = "From $from $subject";