Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL with querystring variables in body of mailto tag

Status
Not open for further replies.

rhyswilliams

Programmer
Nov 7, 2000
28
0
0
GB
on my site i have link that users can click to send pages to others. the problem is that some of these pages have multiple querysting variables that i am finding difficult to pass.

this is an example of a link that does not work properly:

<a href=&quot;mailto:?Subject=the+subject&body=http%3A%2F%2F1%2E1%2E1%2E1%2Fcontent%2Flibrary%5Fservices%2Fsearch%5Fresults%2Ecfm%3FRequestTimeout%3D300%26quicksearchterms%3Dconcrete%26searchtype%3Dall%26source%3Dawards%26submitbtn%2Ex%3D44%26submitbtn%2Ey%3D18&quot;>send page</a>

as you can see (?) the email body should contain a link to the following:


but it appears as


in the email.

It appears to me that it is the ampersands in the url querstring that are cusing the problem, but i can't think of a way round it.

thanks in advance.

rhys
 
The email client thinks the query strings are talking to him. As it does not recognise the variables, it ignores them.

You have probably worked that out, but apart from redesigning the database input to have all that information in one big string, I am not sure of a way around it. Dean Owen
 
Alternatively, you could use a CGI form to send the email instead of mailto. If your server is php enabled, that would by far be the easiest way to send it. Dean Owen
 
thanks for your input guys, but i found a way round it by using a form with hidden input fields named 'body', 'subject' etc and using the link to submit the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top