Spycat Posted March 29, 2006 Share Posted March 29, 2006 Hi all,Newbie question here.I have a form that sends out an e-mail with some pre-defined strings in it.However, upon getting the e-mail, I see that some unwanted carriage returnshave been inserted. While I realize that this is normal line wrapping, dependent upon the e-mail client being used and the screen resolution, I was wondering if there was a way to force lines to stay together.Here is what I have from my php:[code]".$name." filled out our Goodwill.of Silicon Valley Customer Information Form\rin order to be notified of upcoming sales in our 16 stores.\rIf you would also like to receive these notifications,\rwe look forward to you paying a visit to: ".$_POST['refurl']."";[/code]Everything is sent fine, alsong with the carriage returns I specified by: \rHowever, when I get the e-mail, a return after "Customer" has been inserted.Is there a solution to this?Thanks,Rick Quote Link to comment https://forums.phpfreaks.com/topic/6108-preventing-unwanted-carriage-returns/ Share on other sites More sharing options...
AshAsirus Posted March 29, 2006 Share Posted March 29, 2006 hmm, if you can send HTML format you can put the text in a Table and give the td a nowrap attribute and that should fix it. .... Just the first Idea that came into my head, i'm sure some better ones exist. Quote Link to comment https://forums.phpfreaks.com/topic/6108-preventing-unwanted-carriage-returns/#findComment-22007 Share on other sites More sharing options...
wildteen88 Posted March 29, 2006 Share Posted March 29, 2006 [!--quoteo(post=359718:date=Mar 29 2006, 06:11 PM:name=Spycat)--][div class=\'quotetop\']QUOTE(Spycat @ Mar 29 2006, 06:11 PM) [snapback]359718[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hi all,Newbie question here.I have a form that sends out an e-mail with some pre-defined strings in it.However, upon getting the e-mail, I see that some unwanted carriage returnshave been inserted. While I realize that this is normal line wrapping, dependent upon the e-mail client being used and the screen resolution, I was wondering if there was a way to force lines to stay together.Here is what I have from my php:[code]".$name." filled out our Goodwill.of Silicon Valley Customer Information Form\rin order to be notified of upcoming sales in our 16 stores.\rIf you would also like to receive these notifications,\rwe look forward to you paying a visit to: ".$_POST['refurl']."";[/code]Everything is sent fine, alsong with the carriage returns I specified by: \rHowever, when I get the e-mail, a return after "Customer" has been inserted.Is there a solution to this?Thanks,Rick[/quote] I do not understand your question. Are yoy saying that when you recieve your email a carriage/new line has been inserted after Customer? If that ios what you're saying then this is out of your control as its the defualt behaviour of the email client its self. Otherwise you'll have to use use the scroll bar at the bottom in order to read your email which is strange!I would recommend you to chnage the following:[code]filled out our Goodwill.of Silicon Valley Customer Information Form\rin order to be notified of upcoming sales in our 16 stores.\rIf you would also like to receive these notifications,\rwe look forward to you paying a visit to: [/code]to[code]filled out our Goodwill.of Silicon Valley Customer Information Form in order to be notified of upcoming sales in our 16 stores.\rIf you would also like to receive these notifications, we look forward to you paying a visit to:[/code]Now that you have used 1 carriage return your email should now look fine in any screen resolution/email client regardless of the size of the email viewing window.This is the way I'd recommend. Quote Link to comment https://forums.phpfreaks.com/topic/6108-preventing-unwanted-carriage-returns/#findComment-22026 Share on other sites More sharing options...
Spycat Posted March 30, 2006 Author Share Posted March 30, 2006 Thank you much for the help -- it looks good now.I appreciate it!Rick Quote Link to comment https://forums.phpfreaks.com/topic/6108-preventing-unwanted-carriage-returns/#findComment-22158 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.