d3lt49 wrote: > Hi, > > I have script running by CRON which is responsilble for receiving > email from pop|imap server and then inserting this email to my database. > > When my server is down, CRON is not working, and no emails are recieved. > > And when server gets up, CRON launch my script, but all waiting emails > gets current datetime as receive time. (what is not true, cause emails > come earliel and only because server-down I was unable get them > immediately) > > So my question is - how with ezcMail get SERVER received time ? > > Currently I'm using 'timestamp' field from ezcMail.
Hi d3lt49, There is a possibility that the Date header is missing from the mails. In this case, when you request the timestamp property from the ezcMail object, it returns strtotime( '' ) (empty string or null). This returns the current timestamp in PHP versions prior to 5.2.3 (see http://bugs.php.net/bug.php?id=41964). From 5.2.3 it returns false for empty input strings. Which PHP version do you use? Try to display $mail->getHeader( "Date" ) to see if the Date header is missing. Hope this helps. Cheers, Alex. -- Alexandru Stanoi eZ Components System Developer eZ Systems | http://ez.no -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components