harry_beginner harry_beginner - 5 months ago 13
PHP Question

Php mail doesn't display images

There is a PHP mail form. When I am trying to send the displayed HTML page in textarea to my mail, I am received mail without images and styles that I saw in the textarea.

If anyone could then tell me that how can I send this email to multiple recipients with comma separator in receiver text box I would appreciate it.

PHP mail function is used.

} else { // the user has submitted the form
// Check if the "from" input field is filled out
if (isset($_POST["sender"])) {
// Check if "from" email address is valid
$mailcheck = spamcheck($_POST["receiver"]);
if ($mailcheck==FALSE) {
echo "Invalid input\n <button onclick=\"goBack()\">Go Back</button>";
} else {
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers.= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers.= "From: " . strip_tags($_POST['sender']) . "\r\n";
$headers.= "Reply-To: ". strip_tags($_POST['sender']) . "\r\n";
$receiver = $_POST["receiver"];
$sender = $_POST["sender"];// sender
$subject = $_POST["subject"];
$message = $_POST["message"];

// message lines should not exceed 70 characters (PHP rule), so wrap it
//$message = wordwrap($message, 1000);
// send mail
echo "Mail(s) has been sent successfully!\n <button onclick=\"goBack()\">Go Back</button>";


I see in my email client - <img src="\&quot;http://www.watchbotcamera.com/newsletter/watchbot/wb-button-upgrade.‌​png\&quot;" alt="\&quot;\&quot;">. Same for styles.

At first check the parameters starting with "magic_quotes_" in your "php.ini".

From - http://www.tinymce.com/forum/viewtopic.php?id=10064

Try use - get_magic_quotes_gpc