Send link
<html><body bgcolor=\"#FFFFFF\">
<title>Mail-A-Link</title>
<% \' Grab the title and referring page
title=trim(request.querystring(\"title\"))
referer=request.servervariables(\"http_referer\")
if title = \"\" then
title=trim(request.form(\"title\"))
end if
u_submitted=trim(request.form(\"u_submitted\"))
\' u_submitted checks to see if the form with an email address was submitted
if referer = \"\" then
\' If there is no referring page display an appropriate message
response.write \"You have reached the Mail-A-Link page, but we were unable to recognize the previous page\"
response.end
end if \' End check for referer
\' If the form with the email address has benn submittes send the mail
if u_submitted <> \"Yes\" then
%>
<form action=\"<%= request.servervariables(\"script_name\") %>\" method=\"post\">
<b>Subject:</b> <%= title %>
<br>
<b>Link:</b> <%= referer %>
<p>
Enter the email address of the recipient<br>
<input type=\"text\" name=\"u_email\">
<input type=\"hidden\" name=\"title\" value=\"<%= title %>\">
<input type=\"hidden\" name=\"referer\" value=\"<%= referer %>\">
<input type=\"hidden\" name=\"u_submitted\" value=\"Yes\">
<input type=\"submit\" value=\"Sumbit\">
<% else
referer=request.form(\"referer\")
body = \"The following link was sent to you by a user of YourServer.com\"
body = body & \"Subject:\" & title
body = body & \"Link:\" & referer
\' This is the begining of the email creation and execution
\' Remove the comments befor each statement that begins with Set or sm
\' to actually send the mail message
\' Create a new mail object on the server
\' set sm = server.CreateObject(\"CDONTS.Newmail\")
\' Declare what address is sending the message
\' sm.from = \"requested_link@yourserver.com\"
\' Write the users subject to the subject of the email
\' sm.Subject = \"Requested Link:\" & title
\' Declare what address the message is being sent to
\' The Addressee is set to the inputted value
\' sm.to = u_email
\' Write the users message to the body of the email
\' sm.body = u_body
\' Send the message
\' sm.Send
\' Clean up the server object
\' set sm = nothing
%>
Your mail has been sent
<% end if \'end check for submiisson with an email address %>
</body>
</html>
virker ikke ?????? jeg tror det er fordi jeg ikke kan køre CDONTS, hvad skal jeg gøre for at bruge Jmail???
