Hi daibhidh,
In the manage.php file, all the database transactions
match on the exact entry, so I would expect the results
you are getting.
The SQL statements in this file always uses the
relational operator "Equal to" (=)
like this.
WHERE EMAIL_ADDR = "%s"
So it will match only on exactly what is in the database.
(The %s is always the $from variable in this file)
You would need to enhance the code to deal with the
situation you have. That could be a lot of work, and
I am not sure you would want to do it anyway.
You could do something like parse the $from variable.
Perhaps extract out the email portion, and the display
name into variables.
You could combine that with using the LIKE operator
in your SQL statements, this would allow you to use
wildcards on your searches.
For example, in your case, the statement
WHERE EMAIL_ADDR LIKE '"%" <
[email protected]>'
would match on
"Joe Bloggs" <
[email protected]>
"Joe" <
[email protected]>
or any other name inside the quotes.
Having said this, I am not sure you would want to
do all of this.
Suppose these display names where actually two
different people. For example, two different people in a
support organization.
"Joe Bloggs" <
[email protected]>
"Joe" <
[email protected]>
Suppose "Joe Bloggs" wants to subscribe to the Unix
newsletter. You probably wouldn't want the other "Joe" to be able to
unsubscribe. I know of a big support organization that is
set up this way. Everyone sees each other's email to this
support email address, but they are actually different people.
Maybe not the most practical example here, but this is something to
think about.
That's why I think it's easier just to leave it like
it is. When that user first subscribes, that's what
goes into the database, and the burdon is on the user
to keep using that same email, that's the way it is
currently.
I hope this helps.