jcombs_31 Posted December 4, 2006 Share Posted December 4, 2006 I don't know why I haven't notice this problem before, but here it goes. I have a textarea field that submits and does multiple things. I check it with mysql_real_escape_string and then insert it into a database and then to an email. When it gets entered into the database it I guess uses \r\n for line breaks. When I send the email, instead of correctly formatting line breaks, it sends the email with \r\n all over the place. How do I correctly go about this with the correct formatting? Link to comment https://forums.phpfreaks.com/topic/29399-sending-email/ Share on other sites More sharing options...
gerkintrigg Posted December 4, 2006 Share Posted December 4, 2006 i guess you could break the string using explode and then use a foreach loop to remove them and send emails individually?Hope that makes sense (and that i have the right idea of what your question is). Link to comment https://forums.phpfreaks.com/topic/29399-sending-email/#findComment-134878 Share on other sites More sharing options...
jcombs_31 Posted December 4, 2006 Author Share Posted December 4, 2006 I think the problem is that I've never really used mysql_real_escape_string when sending an email. I'm only doing this because I'm first entering into the db. I think normally you simply get a \n for the new line, but mysql_real_escape_string is adding \r\n which the email doesn't handle as a new line. I guess I have to stript the \r and then just leave the \n ?? Link to comment https://forums.phpfreaks.com/topic/29399-sending-email/#findComment-134892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.