Login   Register  
PHP Classes
elePHPant
Icontem

mail dir+bugs

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Receive Mail  >  All threads  >  mail dir+bugs  >  (Un) Subscribe thread alerts  
Subject:mail dir+bugs
Summary:I wanted to ask you if this script supports maildir format?
Messages:3
Author:aleks
Date:2006-12-07 02:19:57
Update:2007-10-25 05:07:20
 

  1. mail dir+bugs   Reply   Report abuse  
Picture of aleks
aleks
2006-12-07 02:19:57
Hi! Useful script, tnx!

I wanted to ask you if script supports maildir format? It doesn't look like it does, but I'm not quite sure.

Also I did some testing and I usual get this error:

Warning: Invalid argument supplied for foreach() in receivemail.class.php on line 122

It referres to this line:

120 $struckture = imap_fetchstructure($this->marubox,$mid);
121 $ar="";
122 foreach($struckture->parts as $key => $value)

so, it's seems like it's not checking for empty arrays. Nice work, once again.

  2. Re: mail dir+bugs   Reply   Report abuse  
Picture of fred
fred
2007-05-20 17:45:53 - In reply to message 1 from aleks
To fix the error message with no attachments are included in a message, I added the two lines as indicated:

function GetAttech($mid,$path) // Get Atteced File from Mail
{
$struckture = imap_fetchstructure($this->marubox,$mid);
$ar="";
$parts = $struckture->parts; /* added */
if (!$parts) return "No attachments"; /* added */

foreach($struckture->parts as $key => $value)
{
$enc=$struckture->parts[$key]->encoding;



  3. Re: mail dir+bugs   Reply   Report abuse  
Picture of mitul koradia
mitul koradia
2007-10-25 05:07:20 - In reply to message 2 from fred
Hi

Thanks for the solution or you can write

if(!is_array($struckture->parts)) return "No Attachement";

Thanks
Mitul