codice:
<%
bolFile = false
Dim oUpload
Set oUpload= new cUpload
With oUpload
.EnabledAspUpload = False
.EnabledImageSize = TRUE
.EnabledLog = False
.AutoRename = True
.Overwrite = False
path="/annunci/allegati/"
.SetPath path
.Load
.UploadOnly "Images"
While Not .Eof
If .Files("Height")=<570 or .Files("Width")=<450 then
Response.redirect ("errore.htm")
else
nomeFile="foto" & codiceID &"."& .Files("ext")
bolFile = true
.SaveAs(nomeFile)
.MoveNext
End if
Wend
End With
Dim Mail
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "xxxxx"
Mail.From = "xxxxx"
Mail.AddAddress "xxxxx"
Mail.Subject = "xxxxx"
Mail.Body = "Mittente: " & oUpload.Form("nome") & " " & oUpload.Form("cognome") & "" & chr(10) &_
"Indirizzo: " & oUpload.Form("indirizzo") & ""& chr(10) &_
"CAP: "& oUpload.Form("cap") & ""& chr(10) &_
"Città: " & oUpload.Form("citta") & "" & chr(10) &_
"Stato: " & oUpload.Form("stato") & "" & chr(10) &_
"Telefono: " & oUpload.Form("tel") & "" & chr(10) &_
"E-mail: " & oUpload.Form("email") & "" & chr(10)
if bolFile then
Mail.AddAttachment server.mappath("/annunci/allegati/"& nomefile)
end if
Mail.Send()
set oUpload=Nothing
set mail = nothing
response.Redirect("grazie.asp")
%>
Roby