Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to trash empty emails' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to trash empty emails
Authored by: toor on Feb 27, '06 11:24:15AM

Since Mail won't accept an empty field, here my humble way to catch empty msgs.:

If any

From Does not contain . ( that's a period, at least one must be in any valid msg. "from" address )

To Does not contain @ ( that's a shift-2, one must be in any valid msg. "to" address )

Then

Move msg. to Trash
Set Color of text to Red ( to show for review in case of false postitves )
Stop evaluating rules.

HTH, salt to taste, YMMV.



[ Reply to This | # ]
An AppleScript to trash empty emails
Authored by: fracai on Feb 27, '06 11:56:35AM

won't this match e-mails that are BCC'd to you resulting in an empty To field?

---
i am jack's amusing sig file



[ Reply to This | # ]
An AppleScript to trash empty emails
Authored by: toor on Feb 27, '06 01:04:17PM

Could be, unless one considers those spam too. ;-)

Changing "If any" to "If all" should fix that, and/or substitute the "To:" filed w/ the "Subject:" field, etc.



[ Reply to This | # ]