 |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

July 14th, 2003, 05:57 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problems with ASP e-mail for non-Latin characters
Hello all
I have a very big problem with my ASP pages sending e-mail to my users. I want them to have Greek characters in the message, but these characters com with the following appearance:
? a?t?µ? sa? ??a pa???? ?p??es??? ap? t? ???t?? t?? s??e??at?? t??
I have used many different components which my host supports (CDONTS, JMail, Persits ASPMail etc.) and they all give me the same bad result. This is not an encoding issue since I use HTML and specify: Mail.Charset = "Windows-1253" at the appropriate object of each component (1253 is the Greek Unicode support).
Can anybody help me on this?
Thanks in advance
Nick
|

July 14th, 2003, 06:47 AM
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Have you tried placing a Response.CharSet=.. in the body of the mail;
Kostas Lagos
|

July 14th, 2003, 08:13 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I didn't know that there was a "Charset" property for the Response object. I knew only that of the Stream object.
How does it work, and what arguments does it accept? How should I use it in me problem?
Thanks
Nikos
|

July 15th, 2003, 12:41 AM
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A typical example would be:
<%
Response.CharSet="windows-1253" or
Response.CharSet="iso-8859-7" (Greek also)
and after that your HTML code, like:
Response.Write "<table><tr><td>" ..
If you use HTML code not generated from ASP check your meta tags
Cheers
Kostas Lagos
|

July 15th, 2003, 02:48 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Kostas
I've just tried that. Not working too! I can't believe that! I have used many components (CDONTS, JMail, ASPEmail) and everything sends the same weird characters. And nobody can help in the entire Internet....
My code:
Beginning of the page:
<%@Language=VBScript codepage=1253%>
<!DOCTYPE Body PUBLIC "-//W3C//DTD Body 4.0 Transitional//EN">
<Body>
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/Body; charset=windows-1253">
</head>
Email component (JMail):
Dim JMail, Body
Response.CharSet="windows-1253"
Body = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf _
& "<html>" & vbCrLf _
& "<head>" & vbCrLf _
& "<title>Sample Message From ASP 101</title>" & vbCrLf _
& "<meta http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">" & vbCrLf _
& "</head>" & vbCrLf _
& "<BODY bgColor='#ffffff'>"
Set JMail = Server.CreateObject ("JMail.SMTPMail")
'Message.Logging = true
if request.form("action") = "request" then
JMail.ServerAddress = "mail.fostiras.gr"
JMail.Sender = "registration@fostiras.gr"
JMail.SenderName = "myTeam.gr - The Sports Community"
JMail.Charset = "Windows-1253"
JMail.ContentType = "text/html"
JMail.Subject = "Ã
ëëçÃéêÃ"
Body = Body & "Ã
ëëçÃéêá"
Body = Body & "</body>" & vbCrLf _
& "</html>" & vbCrLf
JMail.Body = Body
JMail.Execute
What could be wrong or missing?
|

July 15th, 2003, 03:55 AM
|
Authorized User
|
|
Join Date: Jul 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Have you tried the iso-8859-7 charset;;If not, please do. Do you open the mail from Outlook Express;; If yes, check the encoding for your HTML messages through its options. Have you checked its appearance on other people's mail; I believe its the system not your code. Try using CDONTS with the code Im sending below: It worksd fine for me :)
Code:
sessionMail="someone@somewhere.gr"
sessionFullName="Kwstas Lagos"
strMailTo="klag@intranet.gr"
mailSubject="Erwtisi"
strSubject="To thema einai.."
strBody="To keimeno einai dokimastiko"
strMessage="<html>"
strMessage=strMessage & "<head>"
strMessage=strMessage & "<style type='text/css'>"
strMessage=strMessage & "td {font-size:10pt; font-weight:none; padding-left:12px; text-align:left; }"
strMessage=strMessage & "td.info { background-color:#DEEAF2; }"
strMessage=strMessage & "</style>"
strMessage=strMessage & "</head>"
strMessage=strMessage & "<body>"
strMessage=strMessage & "<table width=441 border=0 cellpadding=0 cellspacing=4>"
strMessage=strMessage & "<tr><td width=125 height=30 valign=top class='info'> <b>Estali apo:</b></td>"
strMessage=strMessage & "<td width=298 valign=top>" & sessionMail & "</td></tr>"
strMessage=strMessage & "<tr><td height=30 valign=top class='info'><b>Onomateponimo:</b></td>"
strMessage=strMessage & "<td valign=top>" & SessionFullName & "</td></tr>"
strMessage=strMessage & "<tr><td valign=top height=30 class='info'> <b>ÃÃìá:</b></td>"
strMessage=strMessage & "<td valign=top>" & strSubject & "</td></tr>"
strMessage=strMessage & "<tr><td height=30 valign=top class='info'> <b>Keimeno:</b></td>"
strMessage=strMessage & "<td valign=top>" & strBody & "</td></tr>"
strMessage=strMessage & "</table>"
strMessage=strMessage & "</body>"
strMessage=strMessage & "</html>"
Set objMail=Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat=0
objMail.MailFormat=0
objMail.Send sessionMail, strMailTo, mailSubject, strMessage
Set objMail=Nothing
Let me know of the result
Cheers
Kostas Lagos
|

July 15th, 2003, 08:18 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Kosta
You have received the outcome. The only Greek word doesn't work.
My Outlook Express does not have any problem at all, but in any case, I send my test mails to my Hotmail account, and receive messages through my browser.
Nikos
|

July 15th, 2003, 08:44 AM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Do you think that the problem could rely in the SMTP Server machine?
Nikos
|

July 20th, 2004, 02:08 PM
|
Registered User
|
|
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello Guys,
Do you guys came out with the solution yet ? We have one user who is having the same case as this. The server has Multi language install at the Regional setting.
Please advise if anyone have a solution.
Thanks,
Andy
Regards,
Andy
|

September 6th, 2004, 02:25 AM
|
Registered User
|
|
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i also facing the same problem while sending other language email by using CDONTS, anyone could help ???
|
|
 |