Re: MSWord attachment with mail()
| From: | Alberto Brea | Date: | Wed, 25 Jun 2003 03:58:54 +0000 |
| Subject: | Re: MSWord attachment with mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152684@lists.php.net to get a copy of this message | ||
Thanks Chris, Dorgon and Esteban for putting me back on the track.
----- Original Message -----
From: "Chris Hayes" <chayes@antenna.nl>
To: "Alberto Brea" <estudiobrea@fibertel.com.ar>;
<php-general@lists.php.net>
Sent: Tuesday, June 24, 2003 4:34 PM
Subject: Re: [PHP] MSWord attachment with mail()
> At 22:57 24-6-2003, you wrote:
> >Dear list,
> >What header must I use to send a MSWord attachment with mail()?
> >I have looked it up in the manual and on php.net but cannot find it.
>
> for a cvs file aimed at excel i use
>
>
> if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5.5")) {$att = "";}
> else
{$att
> = " attachment;";}
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in
> the past
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
> // always
> modified
> header("Cache-Control: no-store, no-cache, must-revalidate"); //
HTTP/1.1
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Pragma: no-cache"); //
HTTP/1.0
>
> header("Content-type: text/csv");
> header('Content-Disposition: inline;
> filename="Aanmeldingen_SENSE_symposium_2003.csv"');
> echo $string_csv;
>
>
>
> for word i suppose one could use
>
> header("Content-type: application/msword");
>
>
>
>
>