<%@ Language = "VBScript" %> <% Select Case Request.Querystring("Action") Case "Send" on error resume next 'Set variables Dim BackURL Dim strName Dim strEmail Dim strSubject Dim strMessage Dim strUserIP Dim strToEmail Dim daCdoMail 'Replace this email with your real email id strToEmail = "info@capannedicosola.it" BackURL = Request.ServerVariables("HTTP_REFERER") strName = Request.form("Name") strEmail = Request.form("Email") strSubject = Request.form("Subject") strMessage = Request.form("Message") strUserIP = Request.ServerVariables("REMOTE_ADDR") 'Create Mail Object Set daCdoMail = CreateObject("CDONTS.NewMail") daCdoMail.To = strToEmail daCdoMail.From = strEmail daCdoMail.Subject = strSubject daCdoMail.Body = "This message was sent by " & strName & " at " & Now() & ".

" & strMessage & _ "
ASP Contact Form Script Powered by DigitalArakan
" & _ "
http://www.digitalarakan.net" 'You can change the mail body format setting below '0 = HTML, 1 = TEXT daCdoMail.BodyFormat = 0 'You can change the mail format setting below '0 = HTML, 1 = TEXT daCdoMail.MailFormat = 0 'Set Server Side Validation to make sure we got both sender and recipient email Id to send email If strToEmail = "" OR strEmail = "" Then Session("msg") = "Sender Email or Resipient Email is blank. This message can not be sent. Please try again" Response.redirect (BackURL) Else 'Now send email to the address you specified at line no. 16 daCdoMail.Send End If 'Destroy mail object Set daCdoMail = Nothing 'Create result text in a Sesion Session("MsgSent") = "La tua email con soggetto [" & strSubject & "] è stata spedita. Ti ringraziamo per averci contattato." 'Redirect and show the result Response.redirect (BackURL) End Select %> Contattaci <%If Session("msgSent") = "" Then%> <%If Session("msg") <> "" Then%> <%End If%>

Contattaci..!

Albergo Ristorante Capanne di Cosola 

Fraz. Capanne di Cosola, 5 - Cabella Ligure

15060 Alessandria

Tel. e Fax 0143/999126 - Tel  0143/999150

Se vuoi contattarci ora, per qualsiasi domanda o suggerimento, compila gli spazi seguenti e spedisci la richiesta cliccando il pulsante 'Invia Messaggio'. Riceveremo la tua mail e ti risponderemo nel più breve tempo possibile, grazie !
<%=Session("msg")%> 
 
Nome: ">
Email: ">
Soggetto:
Messaggio:
 
 
<% 'DO NOT REMOVE THIS LINE Response.write "

ASP Contact Form Script Powered by DigitalArakan
" & _ "
http://www.digitalarakan.net" %>

<%Else%>

Messaggio Spedito

<%=Session("MsgSent")%> 
<% 'DO NOT REMOVE THIS LINE Response.write "

 

 

ASP Contact Form Script Powered by DigitalArakan
" & _ "
http://www.digitalarakan.net" %>

<%End If 'Destroy session variables Session("MsgSent") = "" Session("msg") = "" %>