Re: Imap Backend Propsal

From: Date: Thu, 29 Jan 2004 21:19:33 +0000
Subject: Re: Imap Backend Propsal
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25335@lists.php.net to get a copy of this message
Hi Bertrand, Thanks for your reply, and your support! What is Pepr? I applied for a PEAR account, and got a notice saying it was opened, but have been unable to log into it as of yet. >I am not sure I understand the use of NULLHOST.COM with >imap_rfc822_parse_headers() in method Mail_ImapMailbox::ImapGetHeaders() mail_rfc822_parse_headers, and actually, imap_headerinfo also have arguments for inclusion of a default host, if that portion of an address isn't present. I guess since these arguments are optional I could add a feature that allows its specification, or, I could the host defined in $_SERVER['HTTP_HOST'] or $_SERVER['SERVER_NAME'] by default?? I thought that this probably is not likely to happen so I just plugged NULLHOST.com in there. Though I also realize that those SERVER variables aren't gauranteed to exist. I'm thinking I'll just add arguments for the setting of optional imap_* arguments, which any good wrapper or utitilty function should have. >I don't think Mail_ImapMailbox::_getUdate() adds anything to strtotime() >native php function but I might be wrong... Oh Ok, yeah, I didn't know about that function, that is definitely a better approach. >Function names shouldn't start with uppercase. I'll fix that. >Maybe you shouldn't worry about declaring all instance vars and instead have >them dynamically instantiated according to the content of the mail. I've been doing OOP for about a year or so and still regularly run into stuff that I didn't know about before, how can I declare variables dynamically? Do I not have to declare a variable with the var keyword before using it? >Some CS cleanup (tabs, for(), foreach()...). I'll work on that also. >I'd add an imapGetRawMessage() method that would return the complete message >without parsing. Sure I can do that. >I'd be extra careful with memory and use some unset() or a free() method if >necessary although I am not sure it is useful with php. I could add a cleanup utility that could be called at the end of loop iteration, or perhaps at the end of the program. Its easy to see how memory consumption could get out of hand. Such as: imapCleanHeaders .. could be called up to wipe out all variables set after calling on imapGetHeaders. And imapCleanParts to clean up variables let over from imapFetchParts.. which for consistency sake I'll change to imapGetParts. Also, Mail_Imap sounds like a better name to me. I wasn't sure what to call it. Rich

« previous php.pear.dev (#25335) next »