Hi all,
Please could you help me here.
I want to upload files to a folder on server and then email them.
I always get the error message.
Here is my code so far:
PHP Code:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
if request.querystring("action") = "Send" then
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.Save "www\docs\"
response.write "test"
Set Mailer = Server.CreateObject("CDONTS.NewMail")
With Mailer
.To = "info@mysite.ie"
.From = "test"
.Subject = "test"
.Body = "attachments"
For Each File in Upload.Files
.AttachFile("www\docs\" & File.Path)
Next
.Send
end with
else response.write "error"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="<%= Request.ServerVariables("SCRIPT_NAME") %>?action=Send" method="post" enctype="multipart/form-data" name="form1">
<input type="file" name="file">
<input type="submit" name="Submit" value="Send">
</form>
</body>
</html>





Bookmarks