I'm working on my little ticketing-system based on PHP.
Now I would like to exclude senders from being processed.
This is a possible list of excluded senders:
Array (
"badboy@example.com",
"example.org",
"spam@spamming.org"
)
Okay - now I would like to check if the sender of an mail matches one of these:
$sender = "badboy@example.com";
I think this is quite easy, I think I could solve this with in_array()
.
But what about
$sender = "me@example.org";
example.org
is defined in the array, but not me@example.org
- but me@example.org
should also excluded, because example.org
is in the forbidden-senders-list.
How could I solve this?