views:

385

answers:

0
        $("#footerform").submit(function(){
$.ajax({
  type: "POST",
  url: "contactrespajax.asp",
  data: $("#footerform").serialize(),
  success: function(){ $("#footerform").hide("slow"); 
        $("#result").show("slow");
      }
});

});

it is submitting a contact form which is sent to my email using ASP CDO.Message.

when i submit hebrew characters i see ??????? (question marks) in my inbox. the encoding i am using is UTF-8

index.htm (UTF-8) > contactrespajax.asp (codepage=65001)

FIREBUG:

Response Headers
Date Wed, 14 Oct 2009 16:17:59 GMT
Server Microsoft-IIS/6.0
X-Powered-By ASP.NET
Content-Length 11
Content-Type text/html
Cache-Control private
Request Headers
Host www.noamsm.co.il
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)
Accept */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://www.noamsm.co.il/index.htm
Content-Length 97
Cookie ASPSESSIONIDSQTQCCTQ=KPMNJJNCGMHABEFLIADGJJDB
Pragma no-cache
Cache-Control no-cache

in POST and RESPONSE i see the hebrew corectly.. in my inbox its crap..

and that my contactrespajax.asp (NOTICE i dropped the sendmail.asp and merged it with this one)

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim fname
Dim contact
Dim message
Dim check
Dim trap

dim replyto
 replyto = Request.form("contact")


fname = Request.form("fname")
contact = Request.form("contact")
message = Request.form("message")
check = Request.form("check")
trap = Request.form("trap")

response.Write(fname)

if (trap = "") then


Set myMail=CreateObject("CDO.Message")
myMail.HTMLBody = "<h1>Sent From Kerenahvah.org's Contact form.</h1><br /><b>" & fname & "</b> wrote:<br /><br />" & message & "<br /><br />And turned newsletter:" & check
myMail.Subject="Mail From Kerenahvah.org Website"
myMail.From="[email protected]"
myMail.To="[email protected]"
myMail.ReplyTo = contact

myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.kerenahvah.org"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "sdnkuj"

myMail.Configuration.Fields.Update

MyMail.Send

set myMail=nothing

else
response.Redirect("google.com")
end if

%>