Re: sending files by mail

From: Date: Tue, 24 Apr 2001 17:00:09 +0000
Subject: Re: sending files by mail
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-50039@lists.php.net to get a copy of this message
On Tuesday 24 April 2001 03:37, David Robley wrote: > On Wed, 25 Apr 2001 00:02, Calin Rotaru wrote: > > Hello! > > > > I generate a text file from a mysql database. > > I'm trying to send this file by mail. Is this possible with mail() > > function ??? I read the documentation, but I didn't find anything yet. > > Thanks. > > > > > > Calin > > You'll need to read the data from the file into a variable which you can > then process and send with mail() I read the file in $body;Then I wrote thees lines: mail($address,$message,$body,"$headers \nContent-Type: text/PLAIN; charset=US_ASCII; name=\"fisier.txt\"\nContent-Transfer-Encoding: BASE64\nContent-Dispositon: attachment; filename=\"fisier.txt\"\n"); and this is the message which I received Content-Type: text/PLAIN; Status: charset=US_ASCII; name="fisier.txt" Content-Transfer-Encoding: BASE64 Content-Dispositon: attachment; filename="fisier.txt" and then the lines from file. I didn'l receive an attachment. What am I doing wrong? Calin

« previous php.general (#50039) next »