Jump to content

Recommended Posts

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 returns
have 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\r
in order to be notified of upcoming sales in our 16 stores.\r
If you would also like to receive these notifications,\r
we look forward to you paying a visit to: ".$_POST['refurl']."";
[/code]

Everything is sent fine, alsong with the carriage returns I specified by: \r
However, when I get the e-mail, a return after "Customer" has been inserted.
Is there a solution to this?

Thanks,
Rick
Link to comment
https://forums.phpfreaks.com/topic/6108-preventing-unwanted-carriage-returns/
Share on other sites

[!--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 returns
have 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\r
in order to be notified of upcoming sales in our 16 stores.\r
If you would also like to receive these notifications,\r
we look forward to you paying a visit to: ".$_POST['refurl']."";
[/code]

Everything is sent fine, alsong with the carriage returns I specified by: \r
However, 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\r
in order to be notified of upcoming sales in our 16 stores.\r
If you would also like to receive these notifications,\r
we 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.\r
If 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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.