Forum Moderators: coopster
The entire message is a separate php file however it requires variables from the the main possessing file that contains the mail() function.
How do I use this file in the message? I though maybe uses output buffering but I can't get it to work.
Sarah
$message = addslashes(file_get_contents('message.php'));
eval("\$msg = \"$message\";");
mail('to@example.com','subject',$msg);
Just a note. The message file should contain the text with the variable names right in it instead of the php echo code. For example, it might contain this:
Hello $name, welcome to our website! It appears you have been inactive since $date, but that is ok....blah blah blah
Should work fine after those changes