From b99d71047a4fcc7d379bdb0db0169809cf98d343 Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Sat, 29 Apr 2023 19:39:49 -0500 Subject: spelling-rbead: Allow for running without --from --- spelling-rbead | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spelling-rbead b/spelling-rbead index 4e92938..00f01eb 100755 --- a/spelling-rbead +++ b/spelling-rbead @@ -28,7 +28,9 @@ unless $help imap = Net::IMAP.new $server imap.login $user, $password imap.select "inbox" - n = imap.search("FROM \"#{$from}\" SUBJECT \"#{$subject}\"").last + + from = $from ? "FROM \"#{$from}\" " : "" + n = imap.search("#{from}SUBJECT \"#{$subject}\"").last if n msgs = imap.fetch n, "body[1.text]" c = msgs[0].attr["BODY[1.TEXT]"] -- cgit v1.2.3