<%@ LANGUAGE = VBScript %> <% mes = "" IsSuccess = false sTo = "info@riccardifactory.com; " sFrom = "contatti@mangilitraining.it" sSubject = "Contatti" sMailServer = "127.0.0.1" sBody = CreaMessaggio() if Request("action")="send" then TestEMail() end if %> Bruno Crivelli
  • Bruno Crivelli SA
    6944 Cureglia / 6805 Mezzovico
    +41 91 966 75 44 / +41 91 966 14 48
    info@bcrivellisa.ch
Per informazioni:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

<% Function CreaMessaggio() Dim strMessaggio strMessaggio = "Nome: " & Request("Nome") & "
" _ & "Cognome: " & Request("Cognome") & "
" _ & "Azienda: " & Request("Azienda") & "
" _ & "Città: " & Request("Città") & "
" _ & "Telefono: " & Request("Telefono") & "
" _ & "Fax: " & Request("Fax") & "
" _ & "Email: " & Request("Email") & "
" _ & "Richiesta: " & Request("EventualiRichieste") & "
" CreaMessaggio = strMessaggio End Function Sub TestEMail() Set objMail = Server.CreateObject("CDO.Message") Set objConf = Server.CreateObject("CDO.Configuration") Set objFields = objConf.Fields With objFields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With With objMail Set .Configuration = objConf .From = sFrom .To = sTo .Subject = sSubject .HTMLBody = sBody End With Err.Clear on error resume next objMail.Send if len(Err.Description) = 0 then 'mes = " Message sent to " + sTo 'mes = mes + " TESTS COMPLETED SUCCESSFULLY!" mes = "I Dati sono stati inviati corretamente" IsSuccess = true else 'mes = " " + Err.Description + " TESTS FAILED!" mes = "Errore nell'invio dei dati" end if Set objFields = Nothing Set objConf = Nothing Set objMail = Nothing End sub Sub Alert(html) if IsSuccess then Response.Write "
Success:" & html & "
" else Response.Write "
Fail:" & html & "
" end if End Sub %>