st0rmer Posted October 25, 2007 Share Posted October 25, 2007 With the php mail function, i want to use include() to put some text into my email. How would i do this? I'm not very good with PHP (just started learning it) Quote Link to comment https://forums.phpfreaks.com/topic/74772-solved-email-include/ Share on other sites More sharing options...
only one Posted October 25, 2007 Share Posted October 25, 2007 What did you want to include? A complete pages contents? try something like this: <?php $message = file_get_contents("page.html"); mail('to@domain.com', 'Subject', $message); ?> Quote Link to comment https://forums.phpfreaks.com/topic/74772-solved-email-include/#findComment-378064 Share on other sites More sharing options...
st0rmer Posted October 26, 2007 Author Share Posted October 26, 2007 Thanks, that should work Quote Link to comment https://forums.phpfreaks.com/topic/74772-solved-email-include/#findComment-378470 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.