ASPmail sender af sig selv!
Hej..jeg har følgende kode :
--------------------------------------------------
I TOPPEN AF SIDEN:
--------------------------------------------------
<%
DIM sendt
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = Request.Form ("fra_navn")
Mailer.FromAddress= "peter@petersen.com"
Mailer.RemoteHost = "mailhub.registeredhost.com"
Mailer.AddRecipient "Rekvirer flere invitationer", "hans@hansen.dk"
Mailer.Subject = "Rekvirer flere invitationer"
Mailer.BodyText = "FRA" & vbCrLf & vbCrLf & Request.Form ("fra_navn") & vbCrLf & Request.Form ("fra_adresse") & vbCrLf & Request.Form ("fra_post") & " " & Request.Form ("fra_by") & vbCrLf & vbCrLf & "TIL" & vbCrLf & vbCrLf & Request.Form ("til_navn") & vbCrLf & Request.Form ("til_adresse") & vbCrLf & Request.Form ("til_post") & " " & Request.Form ("til_by")
if Mailer.SendMail then
sendt = "Er hermed sendt"
else
sendt = ""
end if
%>
--------------------------------------------------
FORMEN LÆNGERE NEDE PÅ SIDEN:
--------------------------------------------------
<table width="280" height="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><form name="rekvirerform" method="post" action="rekvirer.asp">
<table width="280" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="center" valign="top" class="text_spread">REKVIRER INVITATIONER</td>
</tr>
</table>
<table width="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="center" valign="top" class="text_spread_small">FRA</td>
</tr>
</table>
<table width="280" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="80" align="right" class="text_bold">Navn</td>
<td width="200" align="left"><input name="fra_navn" type="text" class="text" id="fra_navn" size="30"></td>
</tr>
<tr>
<td width="80" align="right" class="text_bold">Adresse</td>
<td width="200" align="left"><input name="fra_adresse" type="text" class="text" id="fra_adresse" size="30"></td>
</tr>
<tr>
<td width="80" align="right" class="text_bold">Postnr & by </td>
<td width="200" align="left"><input name="fra_post" type="text" class="text" id="fra_post" size="4">
<input name="fra_by" type="text" class="text" id="fra_by" size="18">
</td>
</tr>
</table>
<table width="280" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="20" align="center" valign="top" class="text_spread_small">TIL</td>
</tr>
</table>
<table width="280" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="80" align="right" class="text_bold">Navn</td>
<td width="200" align="left"><input name="til_navn" type="text" class="text" id="til_navn" size="30"></td>
</tr>
<tr>
<td width="80" align="right" class="text_bold">Adresse</td>
<td width="200" align="left"><input name="til_adresse" type="text" class="text" id="til_adresse" size="30"></td>
</tr>
<tr>
<td width="80" align="right" class="text_bold">Postnr & by</td>
<td width="200" align="left"><input name="til_post" type="text" class="text" id="til_post" size="4">
<input name="til_by" type="text" class="text" id="til_by" size="18"></td>
</tr>
</table>
<input name="Submit" type="submit" class="text_bold" value="Send">
<br>
<%=sendt%>
</form></td>
</tr>
</table>
--------------------------------------------------
Problemet er at når jeg åbner siden i Explorer, så sender den med det samme en mail afsted som ikke indeholder noget da der ikke er tastet noget ind i formen..
Altså den sender automatisk når man loader siden.. Hvorfor gør den det..
Jeg bruger Buydomains.dk og har andre sider på sitet som virker fint med ASPmail..
Hvad kan jeg gøre..
