Fw: [PHP-ES] mail()
| From: | Spain Telecom | Date: | Mon, 08 Oct 2001 08:03:22 +0000 |
| Subject: | Fw: [PHP-ES] mail() | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-14575@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Spain Telecom" <phernand@stnet.es>
To: <davinci@dinamica.com.ar>
Sent: Thursday, October 04, 2001 12:33 PM
Subject: Re: [PHP-ES] mail()
> Hola, esta solucion me ha ido bien, hasta que me he topado con archivos
del
> tipo pdf y zip. Cuando tiene qu eadjuntar archivos de este tipo, no lo
hace.
> Sabes si hay que cambiar el tipo ??? ---> $content_type =
> "application/octet-stream";
>
>
> Gracias .
>
> ----- Original Message -----
> From: "davinci" <davinci@dinamica.com.ar>
> To: <>
> Sent: Tuesday, May 08, 2001 2:03 AM
> Subject: Re: [PHP-ES] mail()
>
>
> > Ah... Ok... Bueno entonces en el archivo php que envía el mail tenés que
> > armar algo como esto:
> >
> >
> > <?
> >
> > include "mime_mail.inc";
> >
> > $content_type = "application/octet-stream";
> >
> > if (!$fd=fopen("archivos", "r")) {
> >
> > PRINT "No puedo abrir el archivo";
> >
> > } else {
> >
> > $data = fread($fd, filesize("archivo"));
> > fclose($fd);
> >
> > $mail = new mime_mail;
> >
> > $mail->from = "nombre@origen.com";
> > $mail->to = "nombre@destino.com";
> > $mail->subject = "Subject del mensaje";
> > $mail->body = "Cuerpo del mensaje";
> >
> > $mail->add_attachment($data, "archivo", $content_type);
> >
> > $mail->send();
> >
> > }
> >
> >
> > PHP Ballester wrote:
> >
> > > Si, hasta ahi estamos de acuerdo, ni siquiera voy a necesitar enviar
el
> > > fichero, porque como es siempre el mismo, ya lo tengo el en servidor,
> pero
> > > como agrego el fichero en la instrucción mail() ??
> > >
> > > Gracias.
> >
> >
> >
> > ---------------------------------------------------------------------
> > Archivo On-line: http://www.phpes.com/
> > Manual PHP en español: http://www.php.net/manual/es/
> > Para dar de baja la suscripción, mande un mensaje a:
> > lista-unsubscribe@phpes.com
> >
> >
>