Ver Mensaje Individual
  #8 (permalink)  
Antiguo 11/05/2003, 13:54
Tukzone
 
Fecha de Ingreso: febrero-2001
Mensajes: 1.374
Antigüedad: 23 años, 2 meses
Puntos: 11
cluster, me confundi, no estoy usando esa, fue producto de mi estres, estoy usando una similar pero no tan buena. Pongo la parte mas importante que es la que procesa el archivo:

Código PHP:
function _build_attachement(){

    
$this->xheaders["Content-Type"] = "multipart/mixed;\n boundary=\"$this->boundary\"";

    
$this->fullBody "This is a multi-part message in MIME format.\n--$this->boundary\n";
    
$this->fullBody .= "Content-Type: text/plain; charset=$this->charset\nContent-Transfer-Encoding: $this->ctencoding\n\n" $this->body ."\n";
    
    
$sepchr(13) . chr(10);
    
    
$ata= array();
    
$k=0;
    
    for( 
$i=0$i count$this->aattach); $i++ ) {
        
        
$filename $this->aattach[$i];
        
$basename basename($filename);
        
$ctype $this->actype[$i];    // content-type
        
$disposition $this->adispo[$i];
        
        if( ! 
file_exists$filename) ) {
            echo 
"<font color=\"#FF0000\"><b>Attachment $filename can't be found</b></font><br>&nbsp;<br>";
        }
        
$subhdr"--$this->boundary\nContent-type: $ctype;\n name=\"$basename\"\nContent-Transfer-Encoding: base64\nContent-Disposition: $disposition;\n  filename=\"$basename\"\n";
        
$ata[$k++] = $subhdr;

        
$lineszfilesize$filename)+1;
        
$fpfopen$filename'r' );
        
$ata[$k++] = chunk_split(base64_encode(fread$fp$linesz)));
        
fclose($fp);
    }
    
$this->fullBody .= implode($sep$ata);

el tema es que me lo manda bien, pero con un nombre cualquiera y sin extension