Hej
Jeg har fundet følgende smarte script fra:
http://www.assonetriver.com/snippets/cdo_code.asp
Det lader til at blive afviklet fint fra min testserver (cybercity), men jeg
modtager ingen mails???
Er der nogen som kender det eller ved hvorfor.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' CDO Email Form v1.0
' Pete Erwin
http://www.assonetriver.com
If (cStr(Request("Submit")) <> "") Then
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = cStr(Request("varFrom")) 'Senders Email Address
objCDO.To = cStr(Request("varTo")) 'Recipient Email Address
objCDO.CC = cStr(Request("varCC")) 'Carbon Copy Address
objCDO.Subject = cStr(Request("varSubject"))'Email Subject
objCDO.Body = cStr(Request("varMessage")) 'Email Message
objCDO.Send() 'send mail
Set objCDO = Nothing 'Clean up your objects!!!
'Response.Redirect("thanks.asp") 'use this to redirect page after delivery
Response.Write("Message Delivered") 'default response
End If
%>
<cfprocessingdirective pageEncoding="iso-8859-1">
<cfcontent type="text/html; charset=iso-8859-1">
<cfset setEncoding("URL", "iso-8859-1")>
<cfset setEncoding("FORM", "iso-8859-1")>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!-- Start CDO Email Form -->
<form name="CDO_Email_Form" method="post" action="">
<table>
<tr>
<td>From</td>
<td> <input name="varFrom" type="text" value="tbkj@pcsg.dk" size="50">
</td>
</tr>
<tr>
<td>To</td>
<td> <input type="text" name="varTo" value="tbkj@pcsg.dk" size="50">
</td>
</tr>
<tr>
<td>CC</td>
<td> <input type="text" name="varCC" size="50"> </td>
</tr>
<tr>
<td>Subject</td>
<td> <input name="varSubject" type="text" value="test" size="50">
</td>
</tr>
<tr>
<td>Message</td>
<td> <textarea name="varMessage" cols="50" rows="5">tezst</textarea>
</td>
</tr>
<tr>
<td colspan="2"> <input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form>
<!-- End CDO Email Form -->
</body>
</html>