|
Posted by ZeldorBlat on 03/22/06 20:37
Nico wrote:
> "ZeldorBlat" <zeldorblat@gmail.com> a écrit dans le message de news:
> 1143047047.293959.114180@g10g2000cwb.googlegroups.com...
>
> > What does the .txt file look like? (Please don't say HTML)
>
>
> Well it looks like that :
>
>
> Email : bois.massif@wanadoo.fr
> Errors : 3
> Reason : 550 <bois.massif@wanadoo.fr>: Recipient address rejected: User
> unknown
>
> Email : subaruclamp@aol.com
> Errors : 2
> Reason : 550 <subaruclamp@aol.com>... User unknown
>
> Email : sylvie.ravise@infonie.fr
> Errors : 64
> Reason : 552 RCPT TO:<sylvie.ravise@infonie.fr> Mailbox disk quota exceeded
>
> Email : c.sibe@cario.fr
> Errors : 2
> Reason : 550 <c.sibe@cario.fr> ... recipient rejected
>
> Email : hohiojijoioh@club-internet.fr
> Errors : 8
> Reason : 550 <hohiojijoioh@club-internet.fr>: Recipient address rejected:
> User unknown in local recipient table
If you're confident about the format of the file, you can just do
something like this:
$fn = 'myfile.php';
$lines = file($fn);
$badAddresses = array();
foreach($lines as $line)
if(strpos($line, 'Email : ') === 0)
$badAddresses[] = substr($line, 8);
Of course that isn't very forgiving if one of the lines looks
different, but it should work nonetheless.
Navigation:
[Reply to this message]
|