Hello.
When I am trying to access inbox with function accessInboxFor($inbox) error appears:
array_search() expects parameter 2 to be array, string given
It's caused by swapped parametres for array search:
array_search($email->Content->Headers->Cc[0], $addressPlusDelimiters)
Should be:
array_search($addressPlusDelimiters, $email->Content->Headers->Cc[0])