I’m trying to create a page where the user can create an HTML newsletter and email it to recipients. It looks like this:
[url]http://www.jaggednighttheatre.com/admin/newsletter.php
I got it to send an HTML email with text and forms but it won’t send an image for some reason. I need it to send images. Here’s my PHP code:
[CODE]
if(isset($_POST[‘submitted’]))
{
$title = mysqli_real_escape_string($dbc, trim($_POST[‘title’]));
$date = trim($_POST[‘date’]);
$body = mysqli_real_escape_string($dbc, trim($_POST[‘body’]));
$letter = ”;
$letter = ‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>’;
$letter .= ‘<html xmlns=”http://www.w3.org/1999/xhtml”>’;
$letter .= ‘<body>’;
$letter .= $body;
$letter .= ‘</body>’;
$letter .= ‘</html>’;
$to = ‘[email protected]’;
$subject = ‘Jagged Night Theatre’;
$headers = “From: [email protected]”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1rn”;
mail($to, $subject, $letter, $headers);
}