Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

One of the sites I manage has an email address which gets mailed by the server whenever an error happens (e.g. an uncaught exception). Usually there's a slow trickle of these (maybe one or two a day), with random weird little problems in various places: sort of a background noise of niggly problems. We try to stay on top of them but often might not look in the folder that collects these errors for a couple of days.

Sometimes something goes really wrong, and we get a load of emails reporting the same error. It would be great if I could get Gmail to notice that it's had a bunch of emails into that address where the subject starts with the same thing.

To be more precise, I'd like to set up a rule like this:

  • when we get an email to errorbox@example.com:
    • if the last two emails sent to errorbox@example.com, and the current one, have a subject starting with the same 80 characters
      • then forward the current mail to urgenterrorbox@example.com

Unfortunately I can't make the rule that the subjects are the same, because the errors tend to have the id of the object causing the exception at the end, which makes the end of the subject slightly different each time. But, the first 80 characters should do it.

Can anyone think of a way to do this, using Gmail, one of the labs things, IfThisThenThat, or something else?

share|improve this question

migrated from superuser.com Apr 11 at 4:00

This question came from our site for computer enthusiasts and power users.

1  
Do you know how to program JavaScript? You can utilize GoogleApps script and program a script to run in gmail. Tips on how to code this would be asked in Stackoverflow. If you do ask it on stackoverflow, post the link here and I'll see if I can help a bit. –  Pathfinder Apr 8 at 15:30
    
Wow stackoverflow.com/users/138557/max-williams Good work! –  Pathfinder Apr 8 at 15:36
    
I know some JS...i don't know anything about GoogleApps but it sounds interesting. I will investigate and link to stackoverflow here if i end up asking there. In the meantime, i welcome any other ideas :) –  Max Williams Apr 8 at 16:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.