Autoreply Turkish character problem

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
koolen
New user
New user
Posts: 25
Joined: 2006-10-05 16:04

Autoreply Turkish character problem

Post by koolen » 2008-06-25 09:43

hi,

i can't write Turkish characters to hmailserver autoreply message. after save, hmailserver deletes these characaters.
is there a bug?

4.4.1-B273 localhost mysql

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Autoreply Turkish character problem

Post by ^DooM^ » 2008-06-25 09:45

hMAil V4 does not support unicode. hMail V5 does though but is still in Alpha testing.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

koolen
New user
New user
Posts: 25
Joined: 2006-10-05 16:04

Re: Autoreply Turkish character problem

Post by koolen » 2008-06-26 16:16

ok. i ll be wait v5 .
thank you

muratdicle
New user
New user
Posts: 1
Joined: 2008-09-23 03:51

Re: Autoreply Turkish character problem

Post by muratdicle » 2008-09-23 04:07

Hi,

Try this for Turkish problem.

Code: Select all

<?php
function ce_($text){
$bul = array('ı', 'ç', 'Ç', 'ş',  'ğ', 'ü', 'ö', 'İ', 'Ş', 'Ğ', 'Ü', 'Ö');
$degis = array('&#305;', '&#231;', '&#199;', '&#351;', '&#287;', '&#252;', '&#246;', '&#304;', '&#350;', '&#286;', '&#220;', '&#214;');
$text= str_replace($bul, $degis, $text);
return $text;
} 


	  $newMessage = new COM("hMailServer.Message");
	  $newMessage->From = "posta@yourdomain.com";
	  $newMessage->FromAddress = "posta@yourdomain.com";
	  $newMessage->AddRecipient("", "murat@xyz.com");
	  $newMessage->Subject = "Don't use Turkish characters in subjet";

         // use htmlBody
         $newMessage->htmlBody = ce_("Şişlide yağmur YAĞDI. ıslandık, İstanbul sokaklardında.");
         $newMessage->Save(); 
?>
In Turkish
Yukarıdaki ce_ fonksiyonu, Türkçe karakterleri HTML kodu şekline dönüştürmektedir. Eğer Body olarak değil de htmlBody olarak mesajınızı yazarsanız ve ce_ fonksiyonuyla değiştirerek atarsanız, mesajlarınız düzgün görünecektir. Herhangi bir kesilme olmayacaktır.

Normalde mesaj ilk Türkçe karaktere geldiğinde kesiliyordu. Yarım gibi görünüyordu. Bu ce_ fonksiyonu Subjet için yemiyor. Mecburen Subject için Türkçe olmayan karakterler yazmalısınız.

Umarım işinizi görür.

Sevgiler.
M. Murat Dİcle
Tested in Windows 2008 WEB edition, hMail and IIS7

It's work for me. :D

M. Murat Dicle
http://www.musonya.com

Crypty
New user
New user
Posts: 4
Joined: 2010-07-09 14:18

Re: Autoreply Turkish character problem

Post by Crypty » 2010-12-02 11:45

Sayfanın en başına

Response.Charset = "ISO-8859-9"
Response.Codepage = 1252

kodlarını ekleyin.

Eğer EventHandlers.vbs sayfasında işlem yapıyorsanız, "response" yazmadan ekleyin.

Charset = "ISO-8859-9"
Codepage = 1252

-----

The top of the page

Response.Charset = "ISO-8859-9"
Response.Codepage = 1252

Add codes.

If you are EventHandlers.vbs on the transaction, "response" to add writing.

Charset = "ISO-8859-9"
Codepage = 1252

User avatar
katip
Senior user
Senior user
Posts: 746
Joined: 2006-12-22 07:58
Location: Istanbul

Re: Autoreply Turkish character problem

Post by katip » 2010-12-02 20:40

Sorry, what "page" do you mean Crypty?
Katip
--
HMS 5.7.0 x64, MariaDB 10.4.10 x64, SA 3.4.2, ClamAV 0.101.2 + SaneS

Crypty
New user
New user
Posts: 4
Joined: 2010-07-09 14:18

Re: Autoreply Turkish character problem

Post by Crypty » 2010-12-16 17:46

Hi Katip,

page or script file (EventHandlers.vbs)

page, hmailserver coding page of the API may be used.

pagename.asp (or php .....) :)

<%
Response.Charset = "ISO-8859-9"
Response.Codepage = 1252

Set obBaseApp = CreateObject ("hMailServer.Application")

.............
%>


EventHandlers.vbs

Charset = "ISO-8859-9"
Codepage = 1252


Sub OnDeliverMessage (oMessage)

.............

End Sub


I do not know what was described as a more simple:)

Post Reply