Okay i have setup a page that will extract the text out of a php file and then email it to the chosen recipient. So its an html based email. The problem is that I have Variables in the php page that need to be replaced with the actual data in that file before sending the email. These variables are taken from a form and stored in hidden form fields. Any help would be greatly appreciated.
The form fields are their username and password.
Code pasted Below.
<?
// get contents of a file into a string
$filename = "welcome-msg\welcome.php";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
mail("me@domain.com", "This is a test", $contents, "From:welcome@domain.com\nContent-Type: text/html; charset=iso-8859-1");
?>