[PHP] sending files by mail

2001-04-24 Thread Calin Rotaru

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sending files by mail

2001-04-24 Thread David Robley

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()

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Fact is solidified opinion

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sending files by mail

2001-04-24 Thread Calin Rotaru

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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]