Solved

Some code to get a carriage return in a "mailto: ... &body=some text long enough to require a CR

Posted on 2006-11-27
5
959 Views
Last Modified: 2010-04-06
Hi folks,

I was wondering if there is a way to introduce a carriage return into a simple mailto: link on a page, so that the body of the email message that is generated does not come out like a run-on sentence.

I'm hoping that in the same way %20 does the space character, another code might do the CR.

Thanks for your help.


0
Comment
Question by:charlietou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:TeRReF
ID: 18019427
Use "\r\n"
0
 
LVL 3

Author Comment

by:charlietou
ID: 18019661
Hi,

Unfortunately, that didn't work.  

I'll include the pertinent text here:

<a href="mailto:info@mydomain.com?subject=Request%20for%20information &body=I would like more information. Please contact me. <CR GOES HERE> [You may optionally provide your phone number here, and the best time of day to reach you. Thank you for your interest.]"

Using \r\n in that spot caused "\r\n" to show up in the text.

Am I missing something?

Charlie T.
0
 
LVL 29

Accepted Solution

by:
TeRReF earned 200 total points
ID: 18019765
Try this:
<a href="mailto:info@mydomain.com?subject=Request%20for%20information &body=I would like more information. Please contact me. %0D%0A [You may optionally provide your phone number here, and the best time of day to reach you. Thank you for your interest.]"
0
 
LVL 3

Author Comment

by:charlietou
ID: 18020151
Thanks, TeRRef,
That did the job!

0
 
LVL 29

Expert Comment

by:TeRReF
ID: 18020262
You're welcome :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best way to find duplicate message in database 7 40
PHP email variable syntax 3 53
Fixed div within Bootstrap carousel item 11 63
Download a website to hdd 2 96
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question