Re: html email showing <br> instead of line breaks

From: Date: Thu, 24 Sep 2009 19:12:11 +0000
Subject: Re: html email showing <br> instead of line breaks
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-298339@lists.php.net to get a copy of this message
>>> \r\n should be between double quotes: "\r\n" I think you'll still see the literal "<br>"s in your final email, though because htmlspecialchars() is converting the angle-brackets in the tag to their respective HTML entities ("&lt;" for "<" and "&gt;" for ">"). A bit of a thorny problem because you probably do want to escape HTML-characters in the message for security purposes. I suppose you could call str_replace() after htmlspecialchars(), instead of before it as you currently do. OTOH, why not just send your email as plain text, instead of HTML? Thanks, Ben

« previous php.general (#298339) next »