%@CodePage = 1255%> <%CodePage = 1255 : Session.CodePage = 1255 : Response.CharSet = "WINDOWS-1255"%>
<%Dim fullname, pprefix, pnum, fprefix, fnum, cprefix, cnum, email, remarks, isok, xmsg, rc, body, ToEmail, phone, fax, cell
isok = True : ToEmail = "studio2www@gmail.com"
If Request.Form <> "" Then
fullname = Request.Form("fullname") : pprefix = Request.Form("pprefix") : pnum = Request.Form("pnum") : fprefix = Request.Form("fprefix")
fnum = Request.Form("fnum") : cprefix = Request.Form("cprefix") : cnum = Request.Form("cnum") : email = Request.Form("email")
remarks = Request.Form("remarks") : phone = Request.Form("phone") : fax = Request.Form("fax") : cell = Request.Form("cell")
fullname = Replace(Replace(fullname, "'", "'"), Chr(34), """)
remarks = Replace(Replace(remarks, "'", "'"), Chr(34), """)
email = ReplaceChars(email, True, True, True)
'If pprefix <> "" And pnum <> "" Then phone = pprefix & "-" & pnum
'If fprefix <> "" And fnum <> "" Then fax = fprefix & "-" & fnum
'If cprefix <> "" And cnum <> "" Then cell = cprefix & "-" & cnum
If isok Then
' MESSAGE TO USER:
body = "" & vbCrLf & _
" " & vbCrLf & _
" "
rc = SendEmail(email, "", "", "אישור יצירת קשר", body, 3)
'rc = SendEmail2(email, "", "", "אישור יצירת קשר", body)
If rc <> "" Then
xmsg = "אירעה תקלה במשלוח ההודעה! (1)תודה שפניתם אלינו! " & vbCrLf & _ fullname & " שלום, " & vbCrLf & _ "הודעתכם התקבלה בהצלחה! אחד מנציגינו יצור עמכם קשר במהלך 24 השעות הקרובות. (הודעה זו נשלחה באופן אוטומטי.)" & vbCrLf & _ " אנא נסה שנית. (" & rc & ")" : isok = False End If End If If isok Then ' MESSAGE TO ADMIN: body = "" & vbCrLf & _ " " & vbCrLf & _
" "
rc = SendEmail(ToEmail, "", "", "התקבלה הודעה חדשה מהאתר", body, 1)
'rc = SendEmail2(ToEmail, "", "", "התקבלה הודעה חדשה מהאתר ", body)
If rc <> "" Then
xmsg = "אירעה תקלה במשלוח ההודעה! (2)פרטי ההודעה " & vbCrLf & _ "שם מלא: " & fullname & " " & vbCrLf & _ "טלפון: " & phone & " " & vbCrLf & _ "פקס: " & fax & " " & vbCrLf & _ "סלולרי: " & cell & " " & vbCrLf & _ "אימייל: " & email & " " & vbCrLf & _ "הערות: " & Replace(remarks, vbCrLf, " ") & " " & vbCrLf & _ " אנא נסה שנית. (" & rc & ")" : isok = False End If End If If isok Then xmsg = "ההודעה נשלחה בהצלחה." Response.Redirect "thanks.php" End If End If ' ***************************************************************************** Function SendEmail(iToEmail, iCC, iBCc, iSubject, iBody, iPriority) On Error Resume Next Dim xMail, temp, i 'Select Case iPriority ' Case 1,3,5: ' as is ' Case Else: ' iPriority = 3 'End Select If iPriority = "" And iPriority <> 1 And iPriority <> 3 And iPriority <> 5 Then iPriority = 3 ' 3=normal Set xMail = Server.CreateObject("Persits.MailSender") With xMail .Host = "mail.megahost.co.il" : .Username = "post@megahost.co.il" : .Password = "MegaHost001" .CharSet = "WINDOWS-1255" .From = "info@studio.co.il" .FromName = "studio.co.il" For i = 0 To UBound(Split(iToEmail, ",")) .AddAddress Split(iToEmail, ",")(i) Next For i = 0 To UBound(Split(iCC, ",")) .AddCC Split(iCC, ",")(i) Next For i = 0 To UBound(Split(iBCc, ",")) .AddBcc Split(iBCc, ",")(i) Next .IsHTML = True .Priority = iPriority ' 1=high, 3=normal, 5=low .Body = iBody .Subject = xMail.EncodeHeader(iSubject, "WINDOWS-1255") .Send() End With Set xMail = Nothing If err.number <> 0 Then temp = err.Description Else temp = "" SendEmail = temp End Function ' ***************************************************************************** Function SendEmail2(iToEmail, iCC, iBCc, iSubject, iBody) On Error Resume Next Dim mailer, temp Set mailer = Server.CreateObject("CDO.Message") mailer.From = "מגה הוסט ישראל
|