Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Need Help re Mailto.

Need Help re Mailto.
Thread Tools
Mac Enthusiast
Join Date: Oct 2002
Location: London
Status: Offline
Reply With Quote
Feb 20, 2004, 04:15 AM
 
Hey guys

I'm trying to create a mailto link on a webpage that includes text in the title and in the message body of the resulting email.

The problem is, I can't get the line break to work.

Here's the code I'm using:

"Click <a href="mailto:preview@olapreport.com?subject=OLAP Report Preview Request?body=Name: %0dJob Title: %0dCompany: %0dTelephone: ">here</A> to request a free preview of the OLAP Report."

The problem is, when the email opens up, the text in the message body is all in a line and not on sepparate lines. Can anyone help?

BTW, it works fine from Safari but of course most people will be using IE and it doesn't seem to work from there!
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Feb 20, 2004, 08:45 AM
 
Originally posted by schuey100:
The problem is, when the email opens up, the text in the message body is all in a line and not on sepparate lines. Can anyone help?

BTW, it works fine from Safari but of course most people will be using IE and it doesn't seem to work from there!
Here you go:


Click <a href="mailto:preview@olapreport.com?subject=OLAP Report Preview Request&body=Name: %0dJob Title: %0dCompany: %0dTelephone: ">here</A> to request a free preview of the OLAP Report.


When doing URL encoding, you only use a question mark to mark the first element. After that you use ampersand.

Also, you may find that you need to replace spaces with "%20", but it seems to work without on OSX and Safari.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Enthusiast
Join Date: Oct 2002
Location: London
Status: Offline
Reply With Quote
Feb 20, 2004, 09:01 AM
 
Thanks! Works now!.
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Feb 20, 2004, 02:19 PM
 
I have worked on this sort of thing in the past, and had troubles with windows clients. Some combinations of IE and various mail clients (Outlook Express being among them) simply would not acknowledge line breaks. So don't look for 100% compatibility.
     
Mac Enthusiast
Join Date: Oct 2002
Location: London
Status: Offline
Reply With Quote
Feb 20, 2004, 02:21 PM
 
I've noticed 99.9% of my clients are windows and express users so as long as it works for them I'm happy. Now I just need to convince the business world to go OSX hehe
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:01 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2