Results 1 to 2 of 2

Thread: presetting text on email

  1. #1
    Join Date
    Nov 2006
    Location
    IA
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default presetting text on email

    need help with getting e-mail to pre write some of the text for a send to friend link. Something already saying like "??? is recommending you this site. Click here to visit." If this cant be done in html i guess I have to use perl and cgi

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is a simple one. It opens up the user's email program. It has the usual problems with mailto, so if you can do it with cgi, you'd probably be better off that way.

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    
    <script language="javascript">
    function mailpage()
    {
    mail_str = "mailto:?subject=Read about " + document.title;
    mail_str += "&body=I thought you might be interested in this article: " + document.title;
    mail_str += ". You can view it at " + location.href;
    location.href = mail_str;
    }
    </script>
    <title>
    Email this page
    </title>
    </head>
    <body>
    <p>
    <a href="javascript:mailpage()">E-mail This Page</a>
    </p>
    </body>
    </html>

Bookmarks

Posting Permissions

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