<%@ LANGUAGE="VBSCRIPT" %> <% option explicit %> <% Response.Buffer = True %> <% 'Declaring Variables Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Email,ContactUs_Alder,ContactUs_Nat,ContactUs_Kon,ContactUs_Tel,ContactUs_Adr,Company,Djurslag,Djurskyddsansvarig,Typ,Registrerad,TypProv Dim ContactUs_Subject,ContactUs_Body,Action,IsError,Personnummer ' Edit these 3 values accordingly smtpserver = "smtp01.binero.se" youremail = "info@islamguiden.com" yourpassword = "Allahakbar-123" ' Grabbing variables from the form post ContactUs_Name = Request("ContactUs_Name") Personnummer = Request("Personnummer") ContactUs_Email = Request("ContactUs_Email") ContactUs_Tel = Request("ContactUs_Tel") Company = Request("Company") Djurslag = Request("Djurslag") Djurskyddsansvarig = Request("Djurskyddsansvarig") Typ = Request("Typ") Registrerad = Request("Registrerad") TypProv = Request("TypProv") ContactUs_Subject = Request("ContactUs_Subject") ContactUs_Body = Request("ContactUs_Body") Action = Request("Action") ' Used to check that the email entered is in a valid format Function IsValidEmail(Email) Dim ValidFlag,BadFlag,atCount,atLoop,SpecialFlag,UserName,DomainName,atChr,tAry1 ValidFlag = False If (Email <> "") And (InStr(1, Email, "@") > 0) And (InStr(1, Email, ".") > 0) Then atCount = 0 SpecialFlag = False For atLoop = 1 To Len(Email) atChr = Mid(Email, atLoop, 1) If atChr = "@" Then atCount = atCount + 1 If (atChr >= Chr(32)) And (atChr <= Chr(44)) Then SpecialFlag = True If (atChr = Chr(47)) Or (atChr = Chr(96)) Or (atChr >= Chr(123)) Then SpecialFlag = True If (atChr >= Chr(58)) And (atChr <= Chr(63)) Then SpecialFlag = True If (atChr >= Chr(91)) And (atChr <= Chr(94)) Then SpecialFlag = True Next If (atCount = 1) And (SpecialFlag = False) Then BadFlag = False tAry1 = Split(Email, "@") UserName = tAry1(0) DomainName = tAry1(1) If (UserName = "") Or (DomainName = "") Then BadFlag = True If Mid(DomainName, 1, 1) = "." then BadFlag = True If Mid(DomainName, Len(DomainName), 1) = "." then BadFlag = True ValidFlag = True End If End If If BadFlag = True Then ValidFlag = False IsValidEmail = ValidFlag End Function %> www.asinger.se
<% If Action = "SendEmail" Then ' Here we quickly check/validate the information entered ' These checks could easily be improved to look for more things If IsValidEmail(ContactUs_Email) = "False" Then IsError = "Yes" Response.Write("Fyll i en giltig emailaddress.
") End If If ContactUs_Name = "" Then IsError = "Yes" Response.Write("Fyll i ditt namn.
") End If If ContactUs_Body = "" Then IsError = "Yes" Response.Write("Fyll i meddelande.
") End If End If ' If there were no input errors and the action of the form is "SendEMail" we send the email off If Action = "SendEmail" And IsError <> "Yes" Then Dim strBody ' Here we create a nice looking html body for the email 'strBody = strBody & "Mailformuläret skickades den " & Now() & vbCrLf & "

" strBody = strBody & "

Mail till Asinger Education

" strBody = strBody & "Från: http://" & Request.ServerVariables("HTTP_HOST") & vbCrLf & "
" strBody = strBody & "IP" & " : " & " " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf & "
" strBody = strBody & "Namn" & " : " & " " & Replace(ContactUs_Name,vbCr,"
") & "
" strBody = strBody & "Personnummer" & " : " & " " & Replace(Personnummer,vbCr,"
") & "
" strBody = strBody & "Email" & " : " & " " & Replace(ContactUs_Email,vbCr,"
") & "
" strBody = strBody & "Mobilnummer" & " : " & " " & Replace(ContactUs_Tel,vbCr,"
") & "
" strBody = strBody & "Företag" & " : " & " " & Replace(Company,vbCr,"
") & "
" strBody = strBody & "Djurslag" & " : " & " " & Replace(Djurslag,vbCr,"
") & "
" strBody = strBody & "Är du djurskyddsansvarig?" & " : " & " " & Replace(Djurskyddsansvarig,vbCr,"
") & "
" strBody = strBody & "Typ av undervisning" & " : " & " " & Replace(Typ,vbCr,"
") & "
" strBody = strBody & "Var har du gått utbildningen?" & " : " & " " & Replace(Registrerad,vbCr,"
") & "
" strBody = strBody & "Anmälan gäller" & " : " & " " & Replace(TypProv,vbCr,"
") & "
" strBody = strBody & "
" & Replace(ContactUs_Body,vbCr,"
") & "
" strBody = strBody & "
" Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = youremail ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourpassword ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = "asingereducation@gmail.com" 'ObjSendMail.cc = "info@islamguiden.com" 'ObjSendMail.Bcc = ContactUs_Email ObjSendMail.Subject = "Asinger Education - Prov eller omprov till DISA: " & ContactUs_Subject ObjSendMail.From = ContactUs_Email ' we are sending a html email.. simply switch the comments around to send a text email instead ObjSendMail.HTMLBody = strBody 'ObjSendMail.TextBody = strBody ObjSendMail.Send Set ObjSendMail = Nothing ' change the success messages below to say or do whatever you like ' you could do a response.redirect or offer a hyperlink somewhere.. etc etc %>

Ditt meddelande har skickats i väg, och du får svar inom 24 timmar. <% Else %>




Asinger Education

Anmälan till prov eller omprov i DISA


Namn:
Personnummer:
Email:
Mobilnummer:
Företag:

Djurslag:

Nöt Får Häst Vilt Struts Kanin
Ren Kyckling Kalkon Gås

Är du djurskyddsansvarig?:

Ja Nej

Var har du gått utbildningen?:

Hos er Meny Andra

Anmälan gäller:

Prov Omprov

Typ av utbildning:

Distans Fysiska träffar

Meddelande:

 
<% End If %>