Hjælp til Script
Hej.. Jeg har prøvet at lave dette...Jeg får bare en hvis side UDEN fejl nå jeg submitter....
pop3email.asp ( http://www.stivert.dk/test/pop3email.asp )
----------------------------
<% if Request("mode") = "send" then %>
<%
dim error
Session("error") = "Udfyld venligst alle felter.."
error = Session("error")
if Request.Form("mail") = "" Or Request.Form("email") = "" Or Request.Form("navn") = "" then
mode = "fejl"
else
mode = "sendt"
if Request.Form("viderstilling") = "" then
viderstil = "Denne email skal ikke viderstilles.."
else
viderstil = Request.Form("viderstilling")
end if
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.stivert.dk"
JMail.Sendername = Request.Form("Stivert Pop3Email")
JMail.Sender = "pop3email@stivert.dk"
JMail.Subject = Request.Form("navn") & " vil gerne have en stivert.dk email :O)"
JMail.AddRecipient "stivert@stivert.dk"
body = body & "Ønsket Email: " & Request.Form("mail") & "@stivert.dk" & vbcrlf
body = body & "Hans Navn: " & Request.Form("navn") & vbcrlf
body = body & "Hans Email: " & Request.Form("email") & vbcrlf
body = body & "Viderstilles til: " & viderstil & vbcrlf
JMail.body = body & vbcrlf
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
end if
%>
<% elseif Request("mode") = "fejl" then %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</HEAD>
<BODY bgcolor="DimGray" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="post" action="pop3email.asp">
<input type="hidden" name="mode" value="send">
<font face="Arial" color="red"> <%=error%></font>
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><font color="#FFFFFF" face="Arial" size="2"><b>Ønskede
Email </b></font><font face="Arial" size="2"><b><font color="#FFFFFF">
:</font></b></font></td>
<td width="217"><font face="Arial" size="2"><b><font color="#FFFFFF"><input type="text" name="mail" value="<%=Request.Form("mail")%>" size="20">@stivert.dk</font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font face="Arial" size="2"><b><font color="#FFFFFF"><br>
Nuværende Email :</font></b></font></td>
<td width="217" height="2"><font face="Arial" size="2"><b><font color="#FFFFFF"><input type="text" name="email" value="<%=Request.Form("email")%>" size="20"></font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font color="#FFFFFF" face="Arial" size="2"><b><br>
Hvis du ønsker at få din email vidersendt til en anden email indtaster
du den email her :</b></font></td>
<td width="217" height="2"><font face="Arial" size="2"><b><font color="#FFFFFF"><input type="text" name="viderstilling" value="<%=Request.Form("viderstilling")%>" size="20"></font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font color="#FFFFFF" face="Arial" size="2"><b><br>
Dit Navn :</b></font></td>
<td width="217" height="2"><font face="Arial" size="2"><b><font color="#FFFFFF"><input type="text" name="navn" value="<%=Request.Form("navn")%>" size="20"></font></b></font></td>
</tr>
<tr>
<td width="83"></td>
<td width="217"><font face="Arial" size="2"><b><font color="#FFFFFF"><input type="submit" name="Submit" value="Send"></font></b></font></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
<% elseif Request("mode") = "" then %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</HEAD>
<BODY bgcolor="DimGray" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="post" action="pop3email.asp">
<input type="hidden" name="mode" value="send">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><font color="#FFFFFF" face="Arial" size="2"><b>Ønskede
Email </b></font><font face="Arial" size="2"><b><font color="#FFFFFF">
:</font></b></font></td>
<td width="217"> <font face="Arial" size="2"><b><font color="#FFFFFF">
<input type="text" name="mail" size="20">@stivert.dk
</font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font face="Arial" size="2"><b><font color="#FFFFFF"><br>
Nuværende Email :</font></b></font></td>
<td width="217" height="2"> <font face="Arial" size="2"><b><font face="Arial" size="2"><b><font color="#FFFFFF">
<input type="text" name="email" size="20">
</font></b></font><font color="#FFFFFF"> </font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font color="#FFFFFF" face="Arial" size="2"><b><br>
Hvis du ønsker at få din email vidersendt til en anden email indtaster
du den email her :</b></font></td>
<td width="217" height="2"> <font face="Arial" size="2"><b><font color="#FFFFFF">
<input type="text" name="viderstilling" size="20">
</font></b></font></td>
</tr>
<tr>
<td width="83" height="2"><font color="#FFFFFF" face="Arial" size="2"><b><br>
Dit Navn :</b></font></td>
<td width="217" height="2"> <font face="Arial" size="2"><b><font color="#FFFFFF">
<input type="text" name="navn" size="20">
</font></b></font></td>
</tr>
<tr>
<td width="83"><font face="Arial" size="2"><b><font color="#FFFFFF"></font></b></font></td>
<td width="217"> <font face="Arial" size="2"><b><font color="#FFFFFF">
<input type="submit" name="Submit" value="Send">
</font></b></font></td>
</tr>
</table>
</form>
<p> </p>
</BODY>
</HTML>
<% elseif Request("mode") = "sendt" then %>
<% Response.Redirect "pop3sendt.asp" %>
<% end if %>
---------------------
Håber i kan hjælpe...