PC Nerd Posted January 7, 2008 Share Posted January 7, 2008 Hi, Im looking for a way to use my file "email.inc" as the content for an email. the inc file automatically chanegs name values for the user - all I need to do is to have it emailed. is there a way to pass that filename to the mail() function - or do i have to do it another way? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/84854-mail-using-emailinc-as-the-body-of-the-email/ Share on other sites More sharing options...
PC Nerd Posted January 7, 2008 Author Share Posted January 7, 2008 *bump* Quote Link to comment https://forums.phpfreaks.com/topic/84854-mail-using-emailinc-as-the-body-of-the-email/#findComment-432925 Share on other sites More sharing options...
trq Posted January 7, 2008 Share Posted January 7, 2008 <?php ob_start(); include 'email.inc'; $inc = ob_get_clean(); mail('email@foo.com', 'subject', $inc); ?> Quote Link to comment https://forums.phpfreaks.com/topic/84854-mail-using-emailinc-as-the-body-of-the-email/#findComment-432954 Share on other sites More sharing options...
PC Nerd Posted January 7, 2008 Author Share Posted January 7, 2008 Thankks. Will that allow for PHP to run on the incldue before its emailed? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/84854-mail-using-emailinc-as-the-body-of-the-email/#findComment-432963 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.