1

I get a lot of system alerts related blank mails. The custom scripts send empty mails when there is no issue found on the server.

How do I filter such mail? I know how to filter using "From" and "to" fields. I need to know if there is anything in the contents tag.

1
  • 1
    Can you have them custom script add some phrase such as Nothing significant to report. Jun 25, 2012 at 13:08

1 Answer 1

-1

All of the available search operators are listed in GMail advanced search help. There's no standard wildcard selector to put into Doesn't have but according to a question about wildcards you can use Perl RegEx for query. This way, you need to construct a query that searches for the absence of any character in the body.

enter image description here

enter image description here

4
  • And how do you check if the body of the mail is empty?
    – Alex
    Jun 25, 2012 at 13:00
  • You check with the parameters that aren't empty, such as From and Subject.
    – dnbrv
    Jun 25, 2012 at 13:07
  • The OP stated that the script sends empty emails, so how do you check for this situation—if an email’s body is empty or not? That is the OP’s question.
    – Alex
    Jun 25, 2012 at 13:11
  • @Alex: See the edits.
    – dnbrv
    Jun 25, 2012 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.