jrahma;11035179 wrote:I did tried require before trying include and it didn't work too. it's the same problem.. it's not getting included.
[man]include[/man] would generate a warning if it couldn't include the file, which you might or might not see depending on your error reporting settings.
[man]require[/man] would generate a fatal error, which would stop the script dead.
jrahma;11035179 wrote:How can I check that? the email which is getting sent dose not include the part which should be included! anything else i should check?
In addition to dalecosp's suggestion, you could simply [man]echo[/man] the [font=monospace]$body[/font] variable—if the include was successful, it would start with the word "hello"; if not, it would start with "<h1> ...".
You could also add checks like
if( ! file_exists( "includes/email_header.php" ) ){ print "file does not exist"; }
if( ! is_readable( "includes/email_header.php" ) ){ print "file is not readable"; }