incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessio Spoto <ales...@aspoto.net>
Subject [zeta-dev] Re: [Components] Error Parsing Mail
Date Wed, 09 Jun 2010 12:26:20 GMT
Hi Tobias

I've installed xdebug.so, now, please, help me with debug

tell me how & where i've to put the break code

Thanks
Alessio

Il 08/06/2010 19.38, Tobias Schlitt ha scritto:

... Could you try to either
reproduce the issue or to generate an Xdebug function trace from its
occurance? ....



> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Allessio,
>
> On 06/08/2010 06:27 PM, Alessio Spoto wrote:
>
>    
>>> Sorry i wrote 2009.1 ( forget the 2 in the keyboard )
>>> i'm using :
>>>
>>>     * ezComponents 2009.2.1
>>>     * PHP 5.2.10
>>>     * CentOS 5.4
>>>        
> OK, that sounds fine.
>
>    
>>> here part of the script
>>>
>>> $pop3 = new ezcMailImapTransport( "mail.xxx.com" );
>>> $pop3->authenticate( "backup_posta@xxx.com", "pass" );
>>> $pop3->selectMailbox( "Inbox" );
>>> $set = $pop3->fetchByFlag('NEW');
>>> $parser = new ezcMailParser();
>>> $mails = $parser->parseMail( $set );
>>>
>>> $db = ezcDbFactory::create( 'mysql://user:pass@127.0.0.1/maillog' );
>>> ezcDbInstance::set($db);
>>>
>>> foreach ( $mails as $mail ){
>>>      $zfrom='';
>>>      $zto='';
>>>      $zfrom = "{$mail->from->email}";
>>> foreach ( $mail->to as $to ) {
>>>          $zto = "{$to->email}";
>>>          $q = ezcDbInstance::get()->createInsertQuery();
>>>          $q->insertInto( 'messages' )
>>>              ->set( '_From',  $q->bindValue( $zfrom  ) )
>>>              ->set( '_To',  $q->bindValue( $zto  ) )
>>>              ->set( 'Data', $q->bindValue(Date( "o-m-d", $mail->timestamp
>>> ) ))
>>>              ->set( 'Time', $q->bindValue(Date( "H:i",
>>>        
> $mail->timestamp ) ))
>    
>>>              ->set( 'Subject',  $q->bindValue( $mail->subject ) );
>>>
>>>          $stmt = $q->prepare(); // $stmt is a normal PDOStatement
>>>          $stmt->execute();
>>>      }
>>> ....
>>> .....
>>>      echo "From: {$zfrom}\n";
>>>      echo "To: {$zto}\n";
>>>      echo "Data : {$mail->timestamp}\n";
>>>      echo "Subject: {$mail->subject}\n";
>>>      echo
>>>        
> "-----------------------------------------------------------\n";
>    
>>>      echo "\n";
>>>
>>> }
>>>        
> I cannot spot any issue at a first glance. Could you try to either
> reproduce the issue or to generate an Xdebug function trace from its
> occurance?
>
>
> Please do not forget to use "Reply-All" instead of just "Reply" in your
> mail client.
>
> Cheers,
> Toby
> - -- 
> Tobias Schlitt         tobias@schlitt.info       GPG Key: 0xC462BC14
> a passion for php                     http://schlitt.info/opensource
> eZ Components are Zeta Components now!          http://bit.ly/9S7zbn
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkwOgCAACgkQ5bO3TcRivBSxmwCeKGhxfN1IkhPd1qTPlvhyzq4o
> ti8An087423FEsa7EelDia8YpGaRtGYW
> =6Wbg
> -----END PGP SIGNATURE-----
>    


Mime
View raw message