Sida 1
Epostadress: href="mailto:info@***.com">info@***.com
Använd gärna detta formulär för att kontakta
oss.
Sida2
<% Dim strFrom, strSubject, strBody Dim objCDOMail strFrom = Request.Form("from") strSubject = "Kontaktar oss från vårt formulär!" ' Detta skrivs ut i E-posten strBody = "-----------------------------------------------" & vbCrLf strBody = strbody & "Kontaktuppgifter:" & vbCrLf strBody = strbody & "-----------------------------------------------" & vbCrLf strBody = strBody & "Namn: " & Request.Form("namn") & vbCrLf strBody = strBody & "Företag: " & Request.Form("foretag") & vbCrLf strBody = strBody & "E-post: " & Request.Form("from") & vbCrLf strBody = strBody & "Tel: " & Request.Form("tel") & vbCrLf strBody = strBody & "Fax: " & Request.Form("fax") & vbCrLf strBody = strbody & "-----------------------------------------------" & vbCrLf strBody = strBody & "Kommentar/Fråga:" & vbCrLf strBody = strbody & "-----------------------------------------------" & vbCrLf strBody = strBody & Request.Form("kommentar") If strFrom = "" Or Not IsValidEmail(strFrom) Then %> <% Else Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.To = " objCDOMail.From = strFrom objCDOMail.Subject = strSubject objCDOMail.Body = strBody objCDOMail.Send Set objCDOMail = Nothing Response.Write "Tack, för din fråga/kommentar vi kontaktar dig snarast på följande epostadress " & strFrom & ". " End If %> <% Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %> |