View Full Version : presetting text on email
Masterskinnie
03-27-2007, 05:30 PM
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
Veronica
03-27-2007, 06:40 PM
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.
<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>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.