Jump to content

sendmail from multiline textbox


mr.jiggles

Recommended Posts

I wrote a quick script to send multiple mails from a multiline textbox within a HTML page - the problem I'm having is when the email sends if I use a word like "don't" or "can't" within the message body the recipient of the email will see don\'t or can\'t - I  can't work it out

 

Would also like to be able to send html email and not have it stripe out the tags if that possible.

 

<?php


$emails = explode("\n", $_REQUEST['emails']);

$body = str_replace(" ", " ", $body);
$yep = nl2br($body);


foreach($emails as $a)
{

mail($a, $subject,


$yep,

"To:\n" .
    "From: $from\n" .
    "MIME-Version: 1.0\n" .
    "Content-type: text/html; charset=iso-8859-1"); 

echo $a . " - Has been sent\n";
echo "<p>";

sleep(3);	


}

echo "ALL EMAIL SENT OK!<p>";
echo "YOU CAN CLOSE THE WINDOW"

?>

 

Go easy on me, I'm a noob

Link to comment
https://forums.phpfreaks.com/topic/154956-sendmail-from-multiline-textbox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.