That just sounds like a rule you need to build into your email polling process? What are the manual steps you would take to evaluate the email, build that into your solution.
Use a simple Regex to vertify valid email.
This can help: https://regexr.com/
Check also the Community for help. Search for ""Email"" and you will find lots of ready made regex for your future programming.