email & hebrew

i am tring to build a regular form in wich will be send to some email after submition...
but when i am typing hebrew inside the form and use this code, i got some '×>×' ×'×>×"×' gibberish
, i am not a big expert in hebrew but it sure not looks like it...
the page that set the form set as <meta http-equiv="content-type" Content="text/html;charset=utf-8">
and same as with the page that sends the emails...
<%


dim xdep,xmsg
xdep = request.form("ondep")
xmsg = request.form("onmsg")

if xmsg<>"" then

Set objEmail = Server.CreateObject("Persits.MailSender")

objEmail.Username = "emailname"
objEmail.Password = "pass"
objEmail.Host = "host"
objEmail.From = "frommail"
objEmail.AddAddress "to mail"

objEmail.Subject = "var1:" & xdep & "var2:" & xmsg

objEmail.body = "var1:" & xdep & "var2:" & xmsg

objEmail.Send

Set objEmail = Nothing

response.redirect "contactus.htm"

end if
%>


how can i build it inside html in order to pass it normaly?
sasha85Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_Stilgar_Commented:
If I understand you correctly the issue is with the emails that get sent with your code - they appear in gibberish.

Try using other email components (try Windows standard - CDONTS and similar) to see how they send the email. If you get the same results its an issue with your server (or with your code -- but what you pasted here looks fine). If you don't, Persits probably have a bug with UTF8 strings...

Stilgar.
0
sasha85Author Commented:
but when i use:
strBodyPath = Server.MapPath("\folder") & "\mailbody.asp"
objEmail.AppendBodyFromFile strBodyPath

strImagePath = Server.MapPath("\folder\web") & "\welogo.jpg"
objEmail.AddEmbeddedImage strImagePath, "imgfl"

the page mailbody.asp
that is written in hebrew is sent ok...with nice hebrew...
the problem is that i don't know how to pass my variables into it...


mailbody.asp
<HTML>
<HEAD>
<STYLE>BODY {
COLOR: #427d64; FONT-FAMILY: "Arial"; FONT-SIZE: 12pt; MARGIN-LEFT: 8em
}
</STYLE>
</HEAD>
<BODY>
<CENTER>
<IMG SRC="cid:imgfl" BORDER=0></A>
</CENTER>
</BODY>
</HTML>

0
RobbPCommented:
Hi

It works on mine, then either it's the host configuration or there's a problem with the
Mailer.AddAddress "sherice@mascotartist.com"
Mailer.Host = "mail.mascotartist.com"
lines.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

sasha85Author Commented:
as in that code
strBodyPath = Server.MapPath("\folder") & "\mailbody.asp"
objEmail.AppendBodyFromFile strBodyPath

strImagePath = Server.MapPath("\folder\web") & "\welogo.jpg"
objEmail.AddEmbeddedImage strImagePath, "imgfl"


can i set a variable and view it with the icluded file?

something like:

strvar1path = xmsg
objEmail.AddEmbeddedImage strvar1path, "pvar1"

and use it inside the icluded file like
<=cid:pvar1> ?
0
_Stilgar_Commented:
Try this:

mailbody.asp
<HTML>
<HEAD>
<STYLE>BODY {
COLOR: #427d64; FONT-FAMILY: "Arial"; FONT-SIZE: 12pt; MARGIN-LEFT: 8em
}
</STYLE>
</HEAD>
<BODY>
%body%
<CENTER>
<IMG SRC="cid:imgfl" BORDER=0></A>
</CENTER>
</BODY>
</HTML>

And in your code:
strBodyPath = Server.MapPath("\folder") & "\mailbody.asp"
objEmail.AppendBodyFromFile strBodyPath
objEmail.body = Replace(objEmail.body, "%body%", request.form("somevar"))

If this still returns gibberish there is some configuration issues with the server. I've had similar issues in the past with Hebrew sites that were hosted on server which did not recognize it, mainly with DBs like MySQL and MsSQL. Could be that the issue you have is with IIS encoding misconfiguration.

Stilgar.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
_Stilgar_Commented:
Also, check an option to load a page using URL, and then pass the variables as query string values.

Stilgar.
0
RobbPCommented:
It sounds like unicode, try setting these:

Check out this site, you may want to look at 'IsHTML', or 'Charset'.
http://www.ipower.be/en/manual/asp/ASPEmail.aspx
0
sasha85Author Commented:
stilgar, i tried your code...that originaly what i wanted to do...but i get a mail with %body%
it just print the %body%...
is that the right syntax for displaying variables?

about the querystring...that was my first shot...it won't work...
0
sasha85Author Commented:
there is no database involved...it just a form bing submited...
and when i sent it i get the subject in hebrew, the body in utf and the strBodyPath in hebrew too...
that's why i like stilgar's idea...but there is syntax problem with it...
0
sasha85Author Commented:
even if there is problems with hebrew on the server...that not means that there is not a way doing this withembed inside html...the question is how to do this...
0
sasha85Author Commented:
i aborted the ship...i tried IPWorks and jmail and they both good:)
what shell i choose than? what is better?
0
_Stilgar_Commented:
I like JMail better. Obviously Persists component wasn't configured well..

Stilgar.
0
RobbPCommented:
JMail
0
sasha85Author Commented:
IPWorks is not persist component...is there any reason you like jmail batter?
is it involved secure reasons?
i heard that there are ways to read mails that send via those components....?
0
sasha85Author Commented:
in jmail, why do i need to use objEmail.AddRecipient
if i am not using it gives me error
0
sasha85Author Commented:
is there a way in jmail to include file like in aspemail?
strBodyPath = Server.MapPath("\folder") & "\mailbody.asp"
objEmail.AppendBodyFromFile strBodyPath

strImagePath = Server.MapPath("\folder\web") & "\welogo.jpg"
objEmail.AddEmbeddedImage strImagePath, "imgfl"
0
_Stilgar_Commented:
I honestly don't remember much of it. They have excellent documentation though.

http://www.dimac.net/Products/w3JMail/Manuals/w3_JMail.pdf

Stilgar.
0
sasha85Author Commented:
great!:) thank u all
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.