<% function isMail (Address) Set regEx = Server.CreateObject("VBScript.RegExp") regEx.IgnoreCase = True regEx.Global = True regEx.pattern = "^[\w\.\-]+@[\w\.\-]+?\.[a-zA-Z]{2,3}$" isMail = regEx.Test(Address) end function if Request("submit") = "abschicken" then Recipient = Request("_to") 'Recipient = "seibert@otenso.de" if InStr(Recipient, "@otenso.de") < 1 then response.redirect "error.asp" If Request("Anrede") = "" then fehlende_Felder = true If Request("Vorname") = "" then fehlende_Felder = true If Request("Name") = "" then fehlende_Felder = true 'If Request("Firma") = "" then fehlende_Felder = true If Request("Strasse") = "" then fehlende_Felder = true If Request("PLZ") = "" then fehlende_Felder = true If Request("Ort") = "" then fehlende_Felder = true If Request("Telefon") = "" then fehlende_Felder = true If not isMail(Request("EMail")) then fehlende_Felder = true If not fehlende_Felder then EMail = Request("EMail") Set fs = CreateObject("SoftArtisans.FileManager") template = Request("_template") & ".txt" Set f = fs.GetFile(Server.MapPath(template)) set Template = fs.OpenTextFile(f) Message = Template.readAll set Template = Nothing set fs = Nothing For Each x In Request.Form If Left(x, 1) <> "_" and Len(x) > 1 then if Request.Form(x).count = 1 then Wert = Request(x) else Wert = "" for i = 1 to Request.Form(x).count Wert = Wert & Request(x)(i) & vbCrLf next end if Message = replace(Message, "<<" & x & ">>", Wert) End If Next Message = evaluate(Message) set mailer = Server.createObject("EasyMail.SMTP.5") mailer.LicenseKey = "EuMedia (Single Developer)/0130520A10B60D003900" mailer.MailServer = "127.0.0.1" 'mailer.MailServer = "192.168.100.200" mailer.from = Request("Vorname") & " " & Request("Name") mailer.fromAddr = EMail mailer.addRecipient "Mona Breede", Recipient, 1 mailer.subject = Request("_subject") & Request("Ziel") mailer.BodyText = Message mailer.BodyEncoding = 2 if (mailer.SubmitToExpress("c:\programme\EasyMail SMTP Express")) <> 0 then Fehler = mailer.send() if (Fehler <> 0) then response.redirect "error.asp?error=" & Server.URLencode(Fehler) end if end if mailer.Clear(1) Message = "Guten Tag " & Request("Anrede") & " " & Request("Name") & "," & vbCrLf & vbCrLf &_ "ich freue mich ueber Ihre Mail und werde Ihnen so bald als moeglich antworten." & vbCrLf & vbCrLf &_ "Mit freundlichen Gruessen" & vbCrLf & chr(9) & "Mona Breede" & vbCrLf & vbCrLf &_ "______________________" & vbCrLf &_ "Mona Breede" & vbCrLf &_ "Geibelstrasse 9" & vbCrLf &_ "76185 Karlsruhe" & vbCrLf &_ "Tel. 0721/48535-60" & vbCrLf &_ "breede@otenso.de" & vbCrLf &_ "http://www.monabreede.de" mailer.from = "Mona Breede" mailer.fromAddr = "breede@otenso.de" mailer.addRecipient Request("Vorname") & " " & Request("Name"), EMail, 1 mailer.subject = "Ihre Anfrage" mailer.BodyText = Message mailer.BodyEncoding = 2 if (mailer.SubmitToExpress("c:\programme\EasyMail SMTP Express")) <> 0 then Fehler = mailer.send() if (Fehler <> 0) then response.redirect "error.asp?error=" & Server.URLencode(Fehler) end if end if response.redirect "abgeschickt.asp?Anrede=" & Request("Anrede") & "&Name=" & Request("Name") &"" end if end if %> Mona Breede, Fotografie - Kontakt

Kontakt



Mona Breede
Geibelstr. 9
76185 Karlsruhe

Tel. 0721 / 48535-60
breede@otenso.de


Über Anregungen und Kritik freue ich mich !

<% if fehlende_Felder then response.write "Sie haben nicht alle notwendigen Felder ausgefüllt.
Fehlende Felder sind rot hervorgehoben.

" %>

<% if fehlende_Felder and Request("Anrede") = "" then response.write "" %> Anrede >Herr >Frau
<% if fehlende_Felder and Request("Vorname") = "" then response.write "" %> Vorname ">
<% if fehlende_Felder and Request("Name") = "" then response.write "" %> Name ">
Firma ">
Position/Abteilung
<% if fehlende_Felder and Request("Strasse") = "" then response.write "" %> Straße ">
<% if fehlende_Felder and (Request("PLZ") = "" or Request("Ort") = "") then response.write "" %> PLZ / Ort "> ">
<% if fehlende_Felder and Request("Telefon") = "" then response.write "" %> Telefon ">
Telefax ">
<% if fehlende_Felder and not isMail(Request("EMail")) then response.write "" %> E-Mail ">

Konzeption und Realisierung: www.otenso.de