sendMail with chinese characters

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

savorks
Posts: 7
Joined: 26 Nov 2010, 01:48

sendMail with chinese characters

Postby savorks » 14 Jun 2011, 09:10

Hiya,

I have been trying to send user email with chinese characters in message, but soon I encounter the problem which is those characters won't display correctly.

I found this thread had talking about this problem, and I try load message via external UTF-8 txt file as suggest but still no luck ( same result as typing message directly in script, it shows '????????' on sent mail )

Has anyone encounter this problem as well and is there solution to solve it ? thanks for any tips.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 14 Jun 2011, 18:53

Smartfox's forum is my daily newspaper.
savorks
Posts: 7
Joined: 26 Nov 2010, 01:48

Postby savorks » 16 Jun 2011, 00:34

@BigFish

Thank you for response, after read the thread I think my problem may be different to that one.

The messages sent to client and admin tool is ok (will show characters correctly), the problem is when using _server.sendMail for sending email to user, the mail content (message) won't display Chinese characters ( however the subject field will display correctly ).

My environment is

win xp appserv 2.5.10
java 1.6.0_13
sfs 1.6.9
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 16 Jun 2011, 06:19

In that case, please refer to: viewtopic.php?p=4087#4087
Smartfox's forum is my daily newspaper.
savorks
Posts: 7
Joined: 26 Nov 2010, 01:48

Postby savorks » 16 Jun 2011, 06:41

yes I has read that post and try what lapo said ( save mail content as .txt file, use _server.readFile load it, and use it on mail message field), but, still same result, only see ?????? on received mail content.

these is my script :

Code: Select all

var from = "service@moou.com.tw";
var to = "savorksp@hotmail.com";
var subject = "中文字(Chinese characters)"; // these will display correctly in received mail
var message =  _server.readFile("sfsExtensions/data/test.txt");// these won't show Chinese characters in received mail

_server.sendMail(from, to, subject, message);


any help is appreciated ! :oops:
bradsears
Posts: 14
Joined: 22 Dec 2009, 22:01

Postby bradsears » 05 Oct 2011, 20:07

I could use some help here too. I am trying to send French language accented characters and they don't show up in all email clients. Gmail yes Hotmail no.

I'm in 1.6.9 pro.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 06 Oct 2011, 08:54

This may not be a SmartFoxServer issue. See this posting: http://drupal.org/node/78876
Smartfox's forum is my daily newspaper.
bradsears
Posts: 14
Joined: 22 Dec 2009, 22:01

Postby bradsears » 06 Oct 2011, 13:35

Thanks for the reply. I am seeing this is email received via exchange server as well.

If anybody has ideas I am all ears. I don't understand how including local files from the webserver preserve the characters and I also have to build a custom message to verify registration in one case.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 40 guests