Page 1 of 1

mail script

Posted: Tue Nov 09, 2004 9:41 am
by attackle98

Code: Select all

<?php
<?php
$to = $_POST['to'];
$subject = "You Have Been Invited To Join halfmoonstreetmusic.com";
$body = "welcome.txt";
$headers = "From: welcome@halfmoonstreetmusic.com\n";

echo "Mail sent to $to";
mail($to,$subject,$body,$headers);

?>
?>
i want the $body variable to use the welcome.txt file but im not sure if it can be done

Re: mail script

Posted: Tue Nov 09, 2004 10:18 am
by Weirdan
attackle98 wrote: i want the $body variable to use the welcome.txt file but im not sure if it can be done

Code: Select all

$body = file_get_contents('welcome.txt');

Posted: Tue Nov 09, 2004 10:20 am
by attackle98
thank you