JMAIL?
Er der ikke en der kan fortælle mig hvorfor dette ikke virker? Jeg få en 500 internal error når jeg prøver at sende emails!<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 JMail = Server.CreateObject(\"JMail.SMTPMail\")
JMail.ServerAddress = \"mail.viborgnet.dk\"
\' Declare what address is sending the message
JMail.Sender = \"info@kradser.dk\"
\' Write the users subject to the subject of the email
JMail.Subject = \"Requested Link:\" & title
\' Declare what address the message is being sent to
\' The Addressee is set to the inputted value
JMail.AddRecipient = u_email
\' Write the users message to the body of the email
JMail.Body = u_body
JMail.Priority = 1
JMail.Execute
%>
Your mail has been sent
<% end if \'end check for submission with an email address %>
</body>
</html>
