E.mail fra hjemmeside [
Besvar ]
Hei
Trenger hjelp for å få dette riktig. Fikk beskjed av webHtl leverandøren at jeg måtte bruke CDO.Message i stede for CDONTS.NewMail og at siten lå på en windows 2003 server.
Får det bare ikke til å fungere så jeg sender her hele scriptet:
Håper noen kan hjelpe meg
Vh. Roger
<% Option Explicit
Dim myMail, navn, adresse, postnr, poststed, tlf, mail, msg, subject, melding, Obj, textbody
If request.Form("msg")<>"" Then
navn = request.Form("navn")
adresse = request.Form("adr")
postnr = request.Form("postnr")
poststed = request.Form("poststed")
tlf = request.Form("tlf")
mail = request.Form("mail")
subject = request.Form("subject")
msg = request.Form("msg")
Set myMail = CreateObject("CDO.Message")
myMail.From = ""
myMail.to = ""
myMail.Subject = "Melding fra "
.textbody = "<font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Navn: " & navn & "<br>Adresse: " & adresse & "<br>Postnr_sted: " & postnr & " " & poststed & "<br>Telefon: " & tlf & "<br>E-post: " & mail & "<br>Subjekt: "& subject &"<br>Melding: " & msg & "</font>"
myMail.mailFormat = 0
myMail.BodyFormat = 0
myMail.Send
Set myMail = Nothing
End if
%>
<form action="kontakt.asp" method="post" name="melding" target="_self">
<table width="300" height="334" class="stndblack">
<tr class="stndblackbold">
<td height="328" colspan="2" align="left" valign="top">
<table width="165" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="165"><span class="txt">Navn:</span><br>
<input name="navn" type="text" class="txt" id="navn" size="25" maxlength="35"> </td>
</tr>
<tr>
<td><span class="txt">Adresse:</span><br>
<input name="adr" type="text" class="txt" id="adr" size="25" maxlength="35"> </td>
</tr>
<tr>
<td><span class="txt">Postnr:</span><br>
<input name="postnr" type="text" class="txt" id="postnr" size="25" maxlength="4">
</td>
</tr>
<tr>
<td><span class="txt">Poststed:</span><br>
<input name="poststed" type="text" class="txt" id="poststed" size="25" maxlength="35">
</td>
</tr>
<tr>
<td><span class="txt">Telefon:</span><br>
<input name="tlf" type="text" class="txt" id="tlf" size="25" maxlength="8"> </td>
</tr>
<tr>
<td><span class="txt">Email:</span><br>
<input name="mail" type="text" class="txt" id="mail" size="25" maxlength="35">
<br>
<span class="txt">Subjekt:</span><br>
<input name="subject" type="text" class="txt" id="subject" size="25" maxlength="35">
</td>
</tr>
</table>
<br> <br> <input name="Submit" type="submit" class="txt" value="ok">
<input name="Submit2" type="submit" class="txt" value="slett">
<br>
</td>
<td width="271" height="328" align="left" valign="top">
<table width="100" height="326" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="95" valign="top"><img src="../bilder/jpegGif/transparangPx.gif" width="105" height="92">
</td>
</tr>
<tr>
<td width="150" height="141" align="left" valign="top"><span class="txt">Melding </span>
<br>
<textarea name="msg" cols="35" rows="8" class="txt" id="msg"></textarea>
</td>
</tr>
<tr>
<td height="77" align="left" valign="top"><img src="../bilder/jpegGif/transparangPx.gif" width="91" height="75">
</td>
</tr>
</table>
</td>
</table>
</form>