<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim strMessage Dim strNome Dim strCognome Dim strCommento Dim strFile, strFilePath Dim objFso Dim objFile Dim objMail ' Dettagli per l'invio dell'email Const strDestinatario = "gabs@libero.it" Const strMittente = "mittente@email.it" Const strOggetto = "Email inviata tramite form" ' Imposta a true per rimuovere il file dopo l'invio Const blnDelete = false ' Controlla l'invio della form if Request.Querystring("send") = 1 AND Len(Request.Form("submit")) > 0 then ' Richiama i dati dalla form strNome = Request.Form("nome") strCognome = Request.Form("cognome") strDitta = Request.Form("ditta") strInd = Request.Form("ind") strCity = Request.Form("city") strProv = Request.Form("prov") strCap = Request.Form("cap") strNaz = Request.Form("naz") strEmail = Request.Form("email") strTel = Request.Form("tel") strCommento = Request.Form("commento") ' Crea il nome strFile = "emailatt-" &_ Year(Now()) & Month(Now()) & Day(Now()) & "-" & Clng(Timer()) & ".txt" ' Ricava il percorso del file sul server strFilePath = Server.MapPath(strFile) ' Crea il file sul server Set objFso = Server.CreateObject("Scripting.FileSystemObject") Set objFile = objFso.CreateTextFile(strFilePath, true) objFile.WriteLine("Email inviata il " & Date() & " alle " & Time()) objFile.WriteLine("IP: " & Request.ServerVariables("REMOTE_ADDR")) objFile.WriteLine("Client: " & Request.ServerVariables("HTTP_USER_AGENT")) objFile.WriteLine("Nominativo: " & strNome & " " & strCognome) objFile.WriteBlankLines(1) objFile.Writeline(strCommento) objFile.Close Set objFile = Nothing Set objFso = Nothing ' Crea l'oggetto CDONTS Set objMail = Server.CreateObject("CDONTS.NewMail") with objMail ' Mittente .From = strMittente ' Destinatario .To = strDestinatario ' Oggetto .Subject = strOggetto ' Corpo dell'email .Body = "Allegato contenuto email." ' Impostazioni .BodyFormat = 1 ' testo .MailFormat = 1 ' testo .Importance = 1 ' normale ' Allegato .AttachFile strFilePath ' Invia l'email .Send end with Set objMail = Nothing ' Elimina il file dal server se richiesto if blnDelete then Set objFso = Server.CreateObject("Scripting.FileSystemObject") ' Controlla la presenza del file ed elimina if objFso.fileExists(strFilePath) then objFso.deleteFile(strFilePath) end if Set objFso = Nothing end if ' codice per la creazione del file ' scrittura dei contenuti ' ed invio email ' messaggio di conferma strMessage = "

L'email è stata inviata correttamente.
" strMessage = strMessage & "Il contenuto della form è stato allegato all'email.

" end if %> GA.B.S. SRL | Costruzioni Attrezzature Meccaniche | Forature Profonde <% if Len(strMessage) > 0 then Response.Write(strMessage) else %>
  C  o  s  t  r  u  z  i  o  n  i       A  t  t  r  e  z  z  a  t  u  r  e       M  e  c  c  a  n  i  c  h  e  

Ricerca avanzata
 
Richiesta informazioni
Per ricevere ulteriori informazioni compilare cortesemente i seguenti campi:

( * ) Obbligatori

Nome *
Cognome*
Società*
P. IVA
Indirizzo *
Città *
Provincia *
Cap *
Nazione *
E-Mail *
Telefono *
Fax
 
Note *
 
allega file: 
ATTENZIONE!I files non devono pesare più di 10 Mega Bytes
In caso di file superiori ai 10 Mb richiedere dati FTP
 
Acconsenti all'informativa sulla privacy?   Sì    No




Avanti  
News
Assistenza
Richiesta informazioni
Download Home
Dettagli
GA.B.S. SRL


10092 Beinasco (TO) • ITALY

Strada Comunale di None, 19

Tel. +39 011.349.01.52

Fax. +39 011.397.21.13

Part. IVA 03614470015

Tutti i diritti riservati
Invia ad un amico
Top