Is there a way to set up an email sensor to detect information in the subject line of an email? For example we get emails after certain processes finish and we want to monitor if it finishes with errors. I'd like to set up the sensor to alert if the email comes in with anything more than 0 errors returned, but if the email says 0 errors then don't set off the alert.


Article Comments

Hi there,

This is what the IMAP Sensor (https://www.paessler.com/manuals/prtg/imap_sensor) is for. This allows you to check mails in a mailbox extensively. You can find an example for Backup Monitoring here:
https://helpdesk.paessler.com/en/support/solutions/articles/76000063291-how-can-i-monitor-my-backup-software-to-be-sure-backup-succeeded-last-night

Best regards.


Feb, 2019 - Permalink

I have the sensor set up but as far as I can see it only works searching through the subject for example if in the subject of an email "Errors = 0" then the alert will trigger. Is there a way to set up the sensor to alert if in that same example errors equal anything other than 0 then alert.


Feb, 2019 - Permalink

Hi there,

You can adjust the search to your needs, even via regex. So you can surely use "Errors = 1". Or am I understanding something wrong? Could you post an example of a mail and what you want to actually check?

Best regards.


Feb, 2019 - Permalink

I actually want the sensor to only alert if the email shows any errors. So for example

Errors = 0 No Alert

Errors = 4 Alert

We get emails daily and we only want the sensor to alert us if that numerical value is anything other than 0


Feb, 2019 - Permalink

Hi there,

Then you should use a regular expression:

errors = [1-9]+

Best regards,


Feb, 2019 - Permalink

Hmm I can't seem to get that to work. I have an email in the inbox with errors in the body but when I add the search body feature the sensor doesn't go off. This is the layout of the email. The regular expression and string search doesn't seem to pick up the line of total errors with the space. If I have it just search "Total Errors" it seems to detect it fine though.

Total Number of Records:	18771
Total records loaded:	18758
Total Errors:	13

Feb, 2019 - Permalink

Hi there,

Please try the following regular expression:

Total Errors:\s+[1-9]+

You can test and build your own regular expressions by using this site:
https://rubular.com

Best regards.


Feb, 2019 - Permalink