I have a script that works fine with ASPUpload. But a new server I am on doesn't have this .. and it only has ASP Simple Upload. I simply need BIG help in converting the code so it will do the same thing .. but using ASP Simple Upload as opposed to the prior ASPUpload.
If you can help me .. here's the ASPUpload script.
I just need it re-done.
Also, I need it to write the files to a folder that is below the root folder of the website, in a folder already called "database" . That's about the only change. Everything else stays exactly the same.
I kind of need help on this asap. And, if I get it working quickly, I will gladly double the points.
Here's the current ASPUpload script. (The form page forwards the info to this asp script for processing.)
<title>Gordon Designs - Response Form</title>
<h3><font face="arial">Thank You</font></h3>
urlSendTo = "thankyou_emaillist.asp"
Set oUpload = Server.CreateObject("Persits.Upload.1")
oUpload.OverwriteFiles = false 'Create unique filenames by appending (1),(2) ... (n)
FileCount = oUpload.SaveVirtual("/files") 'This needs to be changed so it writes to a folder called (database) which is located one folder beneath the root folder.
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Gordon Designs"
Mailer.RemoteHost = "mail.gordondesigns.com"
Mailer.AddRecipient "Gordon Designs", "firstname.lastname@example.org"
'Mailer.AddRecipient Request.Form("recipient"), Request.Form("recipient")
Mailer.Subject = "Gordon Designs - Email Data"
strMsgHeader = " - Email Form Information Follows - " & vbCrLf & vbCrLf
'this routine has changed. You can use the request object with uploading....
'instead of Request.Form you must use uploadobject.form as below
'for each qryItem in oUpload.Form
for each qryItem in oUpload.Form
' strMsgInfo = strMsgInfo & qryItem & " :: " & oUpload.Form(qryItem) & vbCrLf & vbCrLf
strMsgInfo = strMsgInfo & qryItem.name & " :: " & qryItem.value & vbCrLf & vbCrLf
'If items were uploaded, attachthem to this email.
If FileCount > 0 Then
for each file in oUpload.Files
Mailer.AddAttachment(Server.MapPath("/files/" & file.filename))
strMsgFooter = vbCrLf & vbCrLf & " - End Of This Email Form Information - " & vbCrLf
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter & vbcrlf & FileCount & " files attached."
if Mailer.SendMail then
'Response.Write "Form information submitted..."
Response.Write "Mail send failure. Error was " & Mailer.Response
Please help asap. And if you have any comments about how to fix up the above code, that would also be appreciated.