www.webdeveloper.com
Results 1 to 8 of 8

Thread: Email script

  1. #1
    Join Date
    Nov 2002
    Posts
    4

    Email script

    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.

  2. #2
    Join Date
    Nov 2002
    Posts
    984
    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>

  3. #3
    Join Date
    Nov 2002
    Posts
    4
    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.

  4. #4
    Join Date
    Nov 2002
    Posts
    984
    Ooops sorry, typo

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

  5. #5
    Join Date
    Nov 2002
    Posts
    4
    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 ?)
    Last edited by Doug; 01-18-2006 at 01:39 PM.

  6. #6
    Join Date
    Nov 2002
    Posts
    631
    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.

  7. #7
    Join Date
    Nov 2002
    Posts
    4
    Many thanks Zach.

    Doug.

  8. #8
    Join Date
    Nov 2002
    Posts
    631
    Originally posted by Doug
    Many thanks Zach.

    Doug.
    Did you find it?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles