Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/06/2007, 10:51
vicman
 
Fecha de Ingreso: enero-2004
Ubicación: Medellin
Mensajes: 178
Antigüedad: 20 años, 3 meses
Puntos: 8
Re: Adjuntos con Zend_Mail ?

Me respondo a mi mismo

Código PHP:
$mail = new Zend_Mail();
$mail->setBodyText('Este es el texto del body.'); # text format
$mail->setBodyHtml('My Nice <b>Test</b> Text');   # HTML format
$mail->setFrom('[email protected]''El que envia');
$mail->addTo('[email protected]''Victorman');
$mail->setSubject('Asunto del emilio ' time() );

#preparo adjunto
        
$myImage 'images/process.gif';
$filename basename($myImage);    

$at = new Zend_Mime_Part(file_get_contents($myImage));
$at->type        'image/gif';
$at->disposition Zend_Mime::DISPOSITION_INLINE;
$at->encoding    Zend_Mime::ENCODING_BASE64;
$at->filename    $filename;
$mail->addAttachment($at);    
$mail->send(); 
cambiar lo que dice el ejemplo en la pagina de zend
ENCODING_8BIT por ENCODING_BASE64

y
$at = new Zend_Mime_Part($myImage) por $at = new Zend_Mime_Part(file_get_contents($myImage));