I am using imap_xxx to access emails for my website, we need to discard all emails which are system non-human generated like out of office, autoreply, mail-bounce, error etc. Need to write a code for the same in PHP.
Code pointer would be appreciated.
Thanks
A few regexes you could apply to the envelope sender (“Return-Path” header) to check for automated senders:
headers that indicate automated sender if they exist:
headers that indicate an automated sender if they match a certain regex: