Re: Attaching File to be Emailed
| From: | Frank Arensmeier | Date: | Fri, 24 Nov 2006 08:21:24 +0000 |
| Subject: | Re: Attaching File to be Emailed | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245112@lists.php.net to get a copy of this message | ||
I think the OP was about how to send e-mail attachments - not a question about send a file to the client browser...
1) Read the manual about the function "mail" (especially the user notes)
http://se2.php.net/manual/en/ref.mail.php
2) Google for e.g. "php mail attachment"
Come back to this list when you have further questions.
/frank
24 nov 2006 kl. 06.30 skrev Travis Doherty:
benc11@gmail.com wrote:I need to take a word document or pdf file from either a MySQL db or from a directory, which will then be sent via php script. How can I go about doing this? Can anyone provide sample code or point me in the right direction.Brian Dunning started a thread about nine minutes before you on sending a file to the browser. "Serving out a file to Firefox ... headers?" That's pretty much all you need to do to read from a file (adding in whatever fixes the problem he is experiencing with FireFox of course.) If you wanted to store the data in a MySQL database it would be the same procedure, except you would query the database (BLOB column type) and echo that data instead of using readfile() to get your data. Travis --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php