Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-21-2010, 09:12 PM   PM User | #1
Jimroko
New to the CF scene

 
Join Date: Aug 2010
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Jimroko is an unknown quantity at this point
Unhappy How make line break in email body text?

Hi

I have made a button to automatically write an email. Text automatically appears in the email body. It looks ugly though! There are no line breaks.
I tried putting <br /> into the places where I want a line break, but it doesn't work - I just get "<br />" appearing in my email text!

How can I have a line break appear in the body text of the email?

Many thanks!!
Jim
Jimroko is offline   Reply With Quote
Old 08-22-2010, 05:17 AM   PM User | #2
musicforte
New Coder

 
Join Date: Aug 2010
Location: Illinois
Posts: 20
Thanks: 1
Thanked 1 Time in 1 Post
musicforte is an unknown quantity at this point
try \r\n

if that doesn't work, paste your code and it will be easier to help out.
musicforte is offline   Reply With Quote
Old 08-23-2010, 03:07 AM   PM User | #3
Major Payne
Regular Coder

 
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
Major Payne is an unknown quantity at this point
Code:
<a href="mailto:someaddress@somedomain.com?cc=someotheraddress@somedomain.com&subject=some subject&body=Some body text.%0D%0ASome new line.">create email</a>
You can cause the body text to have a new line within the text you pre-populate by using the ascii characters for a carriage return (%0D) and line feed (%0A).
__________________
☠ ☠RON☠ ☠
Major Payne is offline   Reply With Quote
Users who have thanked Major Payne for this post:
Jimroko (08-23-2010)
Old 08-23-2010, 01:34 PM   PM User | #4
Jimroko
New to the CF scene

 
Join Date: Aug 2010
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Jimroko is an unknown quantity at this point
thank you

Thanks you so much every one. Really helpful and amazing.

All working perfect.

http://www.jimrokos.com/shop.html

(just got to upload it in the next hour or two . . . )
Jimroko is offline   Reply With Quote
Old 08-23-2010, 04:29 PM   PM User | #5
Major Payne
Regular Coder

 
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
Major Payne is an unknown quantity at this point
You are very welcome. Glad you got it working.
__________________
☠ ☠RON☠ ☠
Major Payne is offline   Reply With Quote
Old 08-24-2010, 05:27 AM   PM User | #6
DrunkMunki
New Coder

 
Join Date: Aug 2010
Location: Sydney/Australia
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
DrunkMunki is an unknown quantity at this point
you know by putting your email on the website itself you will get a load of spam, plus alot of users dont have mail clients setup on their pc's, it would probably best to setup a simple contact form.
DrunkMunki is offline   Reply With Quote
Old 08-24-2010, 10:44 AM   PM User | #7
Jimroko
New to the CF scene

 
Join Date: Aug 2010
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Jimroko is an unknown quantity at this point
Yes, I do get lots of spam! I'm planning to make the email button an image, rather than text - would that help for this? Need to set up to take credit card payments really . . .
Jimroko is offline   Reply With Quote
Old 08-24-2010, 11:03 AM   PM User | #8
bestdeveloper
Regular Coder

 
Join Date: Mar 2010
Posts: 277
Thanks: 3
Thanked 6 Times in 6 Posts
bestdeveloper can only hope to improve
When you specify a calculation, there's a button labeled with this character. You can click it to add the line break to your quoted text.
__________________
websitetemplates[dot]bz
bestdeveloper is offline   Reply With Quote
Old 08-24-2010, 04:51 PM   PM User | #9
Major Payne
Regular Coder

 
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
Major Payne is an unknown quantity at this point
You can look at munging techniques:

http://www.projecthoneypot.org/how_t...spambots_3.php

Choose the one that works best for you. The best method of doing what you want to do is to use a server-side script instead of a client side link.
__________________
☠ ☠RON☠ ☠
Major Payne is offline   Reply With Quote
Old 10-27-2011, 01:05 PM   PM User | #10
zen200
New to the CF scene

 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
zen200 is an unknown quantity at this point
Hi all, I am new to this coding stuff and am having similar trouble.

I have used (%0D) and line feed (%0A) which works purfectly on my machine which has windows 7 and office 2010 outlook.

problem is when the same link is opened on other machines all text is on the same line.

Any ideas ?

Code is (works fine on my windows 7 machine with office 2010 outlook)

First%20Aid%20at%20Work%20Enquiry%20-%201%20Days&body=I%20have%20just%20visited%20your%20website%20and%20would%20like%20to%20be%20contact ed%20with%20information%20about%20available%20First%20Aid%20courses%20and%20dates.%0D%0AI%20would%20 provisionally%20like%20to%20book%20(%20%20%20)%20spaces%20on%2019/12/2011%20-%201%20Day%20Course%20%0D%0A%0DMy%20Name%20is%20%20:%0D%0DMy%20Company%20is%20:%0D%0DMy%20Number%20i s%20:%0D%0DMy%20Available%20Dates%20Are%20:%0D%0DPlease%20contact%20me%20to%20discuss%20matters%20fu rther.%20

Please help

Thanks in advance

Zen
zen200 is offline   Reply With Quote
Reply

Bookmarks

Tags
body, email, line break, return, text

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:25 PM.


Advertisement
Log in to turn off these ads.