Hi,
I try to check out the mail with a delivery error in my inbox.
So I wrote a php page which connects to the pop server and gets the received messages.
I want to get both the email address to which I couldn't deliver the message and the error type that is returned (for example :
-550 5.1.1 User unknown
-550 : Recipient address rejected: User unknown
-550 MAILBOX NOT FOUND
etc
To get the error part of the message, I made a list of the error types , I get the body of each email and I check if it contains one of the errors among my error list :
while($error_array=each($error)){
if(substr_count($body,$error_array['value'])>0){
/* the rest of the code gets the email address and inserts it in the database*/
} // end if
} // end while
$error being an array in which I load each error type from the database.
It works well for all error types but 3 :
- 550 5.1.1 ... User unknown
- 550 : Recipient address rejected: User unknown
- 550 5.1.1 ... Unknown user
I don't know why those 3 errors can't be detected with my code while it works with the other.