Link to home
Start Free TrialLog in
Avatar of Neil_Bradley
Neil_BradleyFlag for New Zealand

asked on

php send email

I have a simple email sending script. In place of a regular message I hope to inlcude a pre formatted php file however I cant seem to get the includes script to gell with the $msg
($msg= includes 'myFile.php') does not work..
Ideas welcome.
N
<?php
	$headers  = 'MIME-Version: 1.0' . "\r\n";
				$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
				$headers .= "Reply-To: no_reply@no_reply.co.nz \r\n";
				$headers .= "From: ceo@nzpia.co.nz\r\n";
				
           // Send
                $subject = "Parachute Certificate with \"A\" Endorsement ";
           		$to      = "neil@beaconhilldesign.co.nz" ;
				$headers .= 'Cc: ' . "\r\n";
		

                                
              // the customers order should go here
			  
 $msg .=' I need to output my myFile.php';

           mail($to, $subject, $msg, $headers);

?>

Open in new window

Avatar of Neil_Bradley
Neil_Bradley
Flag of New Zealand image

ASKER

if it helps I have made information I wish to include in my outputted email a functuion called myFile(). However I am still having some trouble getting $msg .= myFile(); to output..
I believe that it may have to be $msg= <?php include 'myFile.php'; ?>, but the command is include without the 's'.
That does not work as we are already in php (so don't need to use <?php  ?>
ASKER CERTIFIED SOLUTION
Avatar of Neil_Bradley
Neil_Bradley
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It was the only correct answer..