-----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( "[email protected]", "pass" ); > > $pop3->selectMailbox( "Inbox" ); > > $set = $pop3->fetchByFlag('NEW'); > > $parser = new ezcMailParser(); > > $mails = $parser->parseMail( $set ); > > > > $db = ezcDbFactory::create( 'mysql://user:[email protected]/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 [email protected] 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-----
