Click to See Complete Forum and Search --> : Email script


Doug
11-21-2002, 03:27 AM
Hi all,
I'm trying to put a script on all of my pages, that will 'send this page to a friend', it will automatically bring up their e-mail propgram, it will have the senders email address in the from field, the subject and some body text will already be complete. The question is, can I do this in a php script and not js ?
Regards.
Doug.

Stefan
11-21-2002, 05:57 AM
You can do this even with plain HTML, however the best way would be to do the entire mailaction serverside. Many mailproggies doen't follow standards or the visitor might not even HAVE a configured mailclient on the mashine he's at.

Anyway, here is the HTML
<a href="mailto:mail@ab.com?subject=blabla?body=some text">Clickme</a>

Doug
11-21-2002, 07:21 AM
Hi Stefan,

Many thanks for that, good help. I think we're nearly there. One thing, when I put the text in that you suggest, I get the body bit in the subject line ? ?

Doug.

Stefan
11-21-2002, 04:04 PM
Ooops sorry, typo

Try
<a href="mailto:mail@ab.com?subject=blabla&body=some text">Clickme</a>

Doug
11-21-2002, 04:10 PM
Many thanks Stefan, just tried it and it works good.

(p.s. I'm just about to start work on putting a search option onto my site for free - any ideas where to start ?)

Zach Elfers
11-22-2002, 12:11 PM
Here on javaScript source there is a good script for that. I think Biab made it or something. It is titles A search engine for YOUR site or something. I forget where it is.:)

Doug
11-22-2002, 12:14 PM
Many thanks Zach.

Doug.

Zach Elfers
11-22-2002, 12:42 PM
Originally posted by Doug
Many thanks Zach.

Doug.

Did you find it?:confused: