How can I include a files contents in mail body?
| From: | Merlin | Date: | Fri, 01 Feb 2002 07:15:44 +0000 |
| Subject: | How can I include a files contents in mail body? | ||
| Groups: | php.lang | ||
| Request: | Send a blank email to php-lang+get-266@lists.php.net to get a copy of this message | ||
I understand how to send mail , from the manual,
<?
$mailTo = "me@somewhere.com";
$msgSubject = "Pretty Cool.";
$xHeaders = "From: robert@chalmers.com.au\nX-Mailer: PHP/".phpversion();
$message = " Now is the time for all good men to come to the aid of the
party";
mail($mailTo, $msgSubject, $message, $xHeaders);
?>
But, I have a file created by another scrip... living in
"/includes/a_file_created_with_html_code_in_it.txt"
How can I get the contents of that file into the $message variable so it
becomes the actual message body?
I've tried all sorts of ways to 'include' it, but to no avail.
Could some knowledgeable soul point me in the right direction please?
Thanks so much
Robert
---
Quantum Radio: World Music with a difference.
http://quantum-radio.net.au/Music/
Now Playing: Srimad Bhagavad Gita - Traditional Indian Selection