I've created a custom command plugin which seems to be (mostly) working as I want it, but there is a case where I would like to ignore a $message and, if possible, leave the message in the email account as unread (I'm using IMAP to pull messages). Is there a way in the process function to reject the message? Or maybe the parse function? I get the impression that once it gets to the process function, it has already started mapping fields and will be imported. I've tried unsetting the $message array which doesn't work.

I've been trying to find examples of where a message is skipped. I'm not mapping user authentication at this point, and just using a single account to import all messages.

Just to provide more detail, in the process function, I do a lookup based on the from address, and if it matches an entry in the database, the message will be imported, but if it doesn't match, I'd like to ignore the message and go to the next email.

Hopefully there is a simple solution that I'm just missing... help is appreciated since I've been spinning my wheels for some time now.

Comments

dpw created an issue.