I'm trying to send an email using PHP. Below is my code:
$Email = fromEmail@myDomain.com;
$To = "myEmail@myDomain.com";
$message = '
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
This is only a test.
</body>
</html>'
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: '".$Email."'\r\n";
$subject = "It doesn't work";
mail($To, $subject, $message, $headers);
And the above code will work. Now here's what I want. I want to somehow embed the code:
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
This is only a test.
</body>
</html>
into a .inc file or some other compatible file so I can do something like this:
$message = require("bodyText.inc");
if it is possible. Is there a way to embed into the $message so I don't have show all the html code?
ljCharlie