downloadMail - Email Match

By Perchpole - November 14, 2016

Hello, All -

This concerns a topic which has been archived:

I'm trying to find a way to match the sender's email address with those present in a list of users. Two methods are suggested in the thread:

if (!in_array($incoming_mail['from'], $allEmails) ( continue; } // skip if email doesn't match

$fromMatchesMember = mysql_count('accounts', array('email' => $incoming_mail['from']));

if ($fromMatchesMember) { etc... }

In practice however, neither seems to work. My guess is because the email in $incoming_mail['from'] contains more data than just the email address. The format looks like this:

Joe Bloggs <>

Is this why the match is failing? If so can someone suggest a fix?



By gkornbluth - November 14, 2016

Hi Perch,

Have a look at this:
It might help...

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at:

By gregThomas - November 15, 2016

Hey Perch, 

Good to see you've got it working!



Greg Thomas

PHP Programmer -