hga77 Posted April 20, 2006 Share Posted April 20, 2006 This is so wierd. I am getting very frustrated. This is the worst kind of coding bug you can get!!! Why? cos its random and I cant track where the problem is coming from.Ok, let me explain:I have an html file that holds the html layout for the email. (email_template.html)From php, I use:[code]$htmlbody = file_get_contents("email_template.html");[/code]within this html file, I have a variable: $$content$$I set a variable ($content) and give it some more html, but within php. Then I say in php:[code]htmlbody = str_replace('$$content$$', $content, $htmlbody);[/code]Finally I use phpMailer to send the email using $htmlbodyThis ALWAYS worked before! But now I get some really wierd result within the html from any email client. And I always randomly get this within the html that messes it up -> & # 13;&# 10;I know thats ascii line feed and something else...But why dont I just get clean html and untouched when its been sent? Any help appreciated Link to comment https://forums.phpfreaks.com/topic/7998-sending-html-email-with-php/ Share on other sites More sharing options...
michaellunsford Posted April 20, 2006 Share Posted April 20, 2006 The $ symbol is used quite a bit by PHP -- Just for grins, I'd change it with a # symbol and see what happens.##content## Link to comment https://forums.phpfreaks.com/topic/7998-sending-html-email-with-php/#findComment-29169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.