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
960 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

630 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