JMail afsender ikke e-mail fra side?
Hej,Jeg har et lille problem med, at mit ASP Script (JMail) ikke vil afsende e-mail fra min side. Afsenderadresse samt smtp mailserver skulle være iorden.
Her er .html-siden som afsendes fra:
-----------------------------------------------------------------
<html>
<head>
<title>Søblik.DK</title>
<meta name="author" content="B&K International, www.bktrading.dk">
<meta name="keywords" content="vin spiritus likør rom whiskey whisky snaps bitter salg onlinesalg onlineshop sprut cognac vodka">
<meta name="description" content="B&K ApS - Vin & Spiritus">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url("page_default.css");
body {
background-image: url();
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-family: Microsoft Sans Serif;
font-size: 11px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
body,td,th {
font-family: Microsoft Sans Serif;
font-size: 11px;
}
h1,h2,h3,h4,h5,h6 {
font-family: Microsoft Sans Serif;
}
-->
</style>
</head>
<body>
<table width="780" height="500" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td height="28">
<form action = "venteliste_mailer.asp" target="_self">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="16%">Navn</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Navn" class="buttons" id="Navn" size ="46" maxlength="60">
</font></td>
<td width="31%"> </td>
</tr>
<tr>
<td>Adresse</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Adresse" class="buttons" id="Adresse" size="46" maxlength="60" >
</font></td>
<td> </td>
</tr>
<tr>
<td>Post nr.</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Post nr." class="buttons" id="Post nr." size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>By</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="By" class="buttons" id="By" size="15" maxlength="15" >
</font></td>
<td> </td>
</tr>
<tr>
<td>Telefon nr.</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Telefon" class="buttons" id="Telefon" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>E-mail</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="E-mail" class="buttons" id="E-mail" size ="25" maxlength="25">
</font></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
<td> </td>
</tr>
<tr>
<td>Behovsdato</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Behovsdato" class="buttons" id="Behovsdato" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>Pris excl. forbrug</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Pris excl. forbrug" class="buttons" id="Pris excl. forbrug" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>Pris inkl. forbrug</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Pris inkl. forbrug" class="buttons" id="Pris inkl. forbrug" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>Størrelse i m2</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Størrelse i m2" class="buttons" id="Størrelse i m2" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td>Antal værelser</td>
<td colspan="3"><font size="2" face="Verdana">
<input name="Antal værelser" class="buttons" id="Antal værelser" size ="15" maxlength="15">
</font></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="2">Helsingør</td>
<td width="31%">Fredensborg</td>
<td> </td>
</tr>
<tr>
<td>Beliggenhed</td>
<td colspan="2"><font size="2" face="Verdana">
<INPUT name="Beliggenhed" type="radio" class="buttons" id=radio
value="Helsingør">
</font></td>
<td><font size="2" face="Verdana">
<INPUT name="Beliggenhed" type="radio" class="buttons" id=radio2
value="Fredensborg">
</font></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td width="11%">Nyistandsat</td>
<td width="11%">God</td>
<td>Mindre god </td>
<td> </td>
</tr>
<tr>
<td>Krav til stand</td>
<td><font size="2" face="Verdana">
<input name="Krav til stand" type="checkbox" class="buttons" id="Krav til stand" value="Nyistandsat">
</font></td>
<td><font size="2" face="Verdana">
<input name="Krav til stand" type="checkbox" class="buttons" id="Krav til stand" value="God">
</font></td>
<td><font size="2" face="Verdana">
<input name="Krav til stand" type="checkbox" class="buttons" id="Krav til stand" value="Mindre god">
</font></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Ja</td>
<td>Nej</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Fælles bad? </td>
<td><font size="2" face="Verdana">
<input name="Fælles bad" type="checkbox" class="buttons" id="Fælles bad" value="Ja">
</font></td>
<td><font size="2" face="Verdana">
<input name="Fælles bad" type="checkbox" class="buttons" id="Fælles bad" value="Nej">
</font></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Fælles toilet? </td>
<td><font size="2" face="Verdana">
<input name="Fælles toilet" type="checkbox" class="buttons" id="Fælles toilet" value="Ja">
</font></td>
<td><font size="2" face="Verdana">
<input name="Fælles toilet" type="checkbox" class="buttons" id="Fælles toilet" value="Nej">
</font></td>
<td> </td>
<td> </td>
</tr>
</table>
<p>
<input name="Send" type="submit" id="Send" value="Send">
<input name="Slet alt" type="reset" id="Slet alt" value="Slet Alt"></p>
</form> </td>
</tr>
</table>
</body>
</html>
-----------------------------------------------------------------
Og her er ASP Scriptet:
-----------------------------------------------------------------
<%@ Language=VBScript %>
<%
'sBodyHtml = sBodyHtml & "sBodyHtml = sBodyHtml & """
'sBodyHtml = sBodyHtml & Server.HTMLEncode("<table width=""89%"" border=""1"" bordercolor=""#AAAFB4"">")
'sBodyHtml = sBodyHtml & """<br>"
'For Each item In Request.Form
' sBodyHtml = sBodyHtml & "sBodyHtml = sBodyHtml & """
' sBodyHtml = sBodyHtml & Server.HTMLEncode("<tr><td width='30%'>" & item & "</td><td width='80%'>"" & Request.Form(""" & item & """) & ""</td></tr>")
' sBodyHtml = sBodyHtml & """<br>"
'Next
'sBodyHtml = sBodyHtml & "sBodyHtml = sBodyHtml & """
'sBodyHtml = sBodyHtml & Server.HTMLEncode("</table>")
'sBodyHtml = sBodyHtml & """"
'Response.Write sBodyHtml
'Response.End
Dim sBodyHtml
sBodyHtml = sBodyHtml & "" & vbcrlf & "<style>" & vbcrlf
sBodyHtml = sBodyHtml & "TD {" & vbcrlf & "font-family: verdana; font-size: 10pt; " & vbcrlf & "}" & vbcrlf
sBodyHtml = sBodyHtml & "BODY {" & vbcrlf & "font-family: verdana; font-size: 10pt;" & vbcrlf & "}" & vbcrlf
sBodyHtml = sBodyHtml & ".head {" & vbcrlf & "font-family: verdana; font-size: 10pt; FONT-WEIGHT: bold;" & vbcrlf & "}" & vbcrlf
sBodyHtml = sBodyHtml & "</style>" & vbcrlf
sBodyHtml = sBodyHtml & "<table width=""50%"" cellspacing=""2"" border=""0"" bordercolor=""#AAAFB4"">"
sBodyHtml = sBodyHtml & "<tr><td width='100%' colspan='2' class='head'><strong>Personlige Data</strong></td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='10%'>Navn:</td><td width='80%'>" & Request.Form("Navn") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Adresse:</td><td width='80%'>" & Request.Form("Adresse") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Post nr.:</td><td width='80%'>" & Request.Form("Post nr.") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>By:</td><td width='80%'>" & Request.Form("By") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Telefon:</td><td width='80%'>" & Request.Form("Telefon") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>E-mail:</td><td width='80%'>" & Request.Form("E-mail") & "</td></tr>"
sBodyHtml = sBodyHtml & "<table width=""50%"" cellspacing=""2"" border=""0"" bordercolor=""#AAAFB4"">"
sBodyHtml = sBodyHtml & "<tr><td width='100%' colspan='2' class='head'><strong>Ønsker til Lejemål</strong></td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='10%'>Behovsdato:</td><td width='80%'>" & Request.Form("Behovsdato") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Pris excl. forbrug:</td><td width='80%'>" & Request.Form("Pris excl. forbrug") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Pris inkl. forbrug:</td><td width='80%'>" & Request.Form("Pris inkl. forbrug") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Størrelse i m2:</td><td width='80%'>" & Request.Form("Størrelse i m2") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Antal værelser:</td><td width='80%'>" & Request.Form("Antal værelser") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Beliggenhed:</td><td width='80%'>" & Request.Form("Beliggenhed") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Krav til stand:</td><td width='80%'>" & Request.Form("Krav til stand") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Fælles bad:</td><td width='80%'>" & Request.Form("Fælles bad") & "</td></tr>"
sBodyHtml = sBodyHtml & "<tr><td width='30%'>Fælles toilet:</td><td width='80%'>" & Request.Form("Fælles toilet") & "</td></tr>"
Dim jmail
Set jmail = Server.CreateObject("JMail.smtpmail")
jmail.ServerAddress = "smtp.cliche.dk"
jmail.ContentType = "text/html"
jmail.AddRecipient "info@ufodesign.dk"
jmail.Sender = "postmaster@soblik.dk"
jmail.SenderName = "Soblik.dk"
jmail.Subject = "Opskrivning til venteliste!"
jmail.Body = "<html><body>" & sBodyHtml & "</body></html>"
jmail.Execute
jmail.Close
Set jmail = Nothing
%>
-----------------------------------------------------------------
Nogen som kan fortælle mig hvad der er galt? Jeg er ikke selv programmør, så jeg har lidt svært ved at aflure fejl m.m.
På forhånd tak,
Bassa