mr.jiggles Posted April 20, 2009 Share Posted April 20, 2009 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 More sharing options...
taith Posted April 20, 2009 Share Posted April 20, 2009 ahhhhhhh the wonderful world of emails(how i hate them)... http://php.net/strip_slashes that'd clear up your excess \es mail($a, $subject,strip_slashes($yep),"To:\nFrom: $from\nMIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1"); Link to comment https://forums.phpfreaks.com/topic/154956-sendmail-from-multiline-textbox/#findComment-815082 Share on other sites More sharing options...
mr.jiggles Posted April 21, 2009 Author Share Posted April 21, 2009 Thanks taith! hours of searching the net turned up nothing, you're a life saver Now onto the html portion... Link to comment https://forums.phpfreaks.com/topic/154956-sendmail-from-multiline-textbox/#findComment-815230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.