mail encoding problem in autoresponder

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
I need to change the encoding and charset values for the mails sent by the autoresponder, since the default usascii encoding wont display mails in japanese correctly. Where are these values set so that I can chaneg them manually?
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Are you by chance using an English language cPanel?
I think you will have to use a custom skin so that the encoding on the autoresponder edit page is either shift_JIS or euc-jp. Even if you do not translate the entire skin, you should at least add the Japanese charset at the top.
I am using a custom skin, and the autoresponders work for me...
 

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
Thanks for the info.

Yes, I use euc-jp for charset in cpanel skin, but the problem is that in Japan, mails are usually sent/read using JIS encoding, and websites use shift-jis or euc-jp.

Which file is used to send autoreply in CPanel? I think i need to have it change the encoding of the autoresponse message before it is actually sent.
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Hmmm. I'm using shift_JIS for my cp, and the autoresponder works fine. The encoding of the e-mail is shift_JIS, and I haven't changed anything other than the encoding of the page the autoresponder is made on.
 

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
I am not sure why it does work for you using Shift_JIS, since in japan, mails are read using JIS(ISO-2022-JP), and the "From" and "Subject" headers must be base64 encoded.

I am currently rewriting the cpanel html files to php files that will save the autoresponders to /home/xxx/.autorespond with the JIS encoding, and set the charset to ISO-2022-JP.
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Oh, you're talking about the subject? No, I'm using English for the subject. You're right, that would get garbled. The body of the message is fine, though. For the body you could use shift_JIS, euc-jp, or probably even UTF-8.
 

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
Yes, you can use other encodings for the body part, but the problem is that in Japan, mails are usually sent using JIS encoding, so the mailers default to using JIS to read mail, and that non techy users dont know how to change the encoding of the text when they receive non-JIS mails.
 
Last edited:

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Are your users using Outlook Express? Most people have the encoding set to "nihongojidosentaku"?@and this will automatically show the e-mail in the correct encoding regardless of whether it comes in ISO, shift_JIS or euc-jp.

--

Oops, I take that back. I just tested it on my computer at work, and it came encoded in western ISO. Crap. I must have done some "techy" setting on my computer at home. :)

Sorry for the confusion. It looks like I'm in trouble, too. Let me know if you get this thing fixed.
 
Last edited:

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
Most mailers dont have the default encoding option so it will use Windows ISO (different from ISO-2022-JP) for the autoresponder mails, since they use us-ascii for charset..
If the charset in mail header is set to ISO-2022-JP, the mailer will use JIS to read mail correctly.

This mail encoding problem is very famous in japan and we always have problem using non-Japanese scripts.
 

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
I will let you know if I can fix this using PHP (probably will be a dirty hack), but the best is that Cpanel devs take this into consideration and allow us to change the charset header of mails
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Crap. I shoulda kept my mouth shut.:)
Well, let me repeat the original question, because now I need the answer, too!

Originally posted by myweb
I need to change the encoding and charset values for the mails sent by the autoresponder, since the default usascii encoding wont display mails in japanese correctly. Where are these values set so that I can chaneg them manually?
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Originally posted by myweb
I am not sure why it does work for you using Shift_JIS, since in japan, mails are read using JIS(ISO-2022-JP), and the "From" and "Subject" headers must be base64 encoded.

I am currently rewriting the cpanel html files to php files that will save the autoresponders to /home/xxx/.autorespond with the JIS encoding, and set the charset to ISO-2022-JP.
It would be nice to be able to change the charset once, wherever that piece of code is stored. I'm going to send in a support request and see what they say.
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
I got a really fast response from cpanel support, but it was not one that I wanted to hear:

Even if you could change this, chances are the changes would be wiped out by cPanel updates every time updates ran.
I guess he's telling me that I can't change it, right?
 

myweb

Well-Known Member
Jun 18, 2002
70
0
156
Tokyo
I will be modifying only the template files and autoresponder files saved in users' home directory, /home/xxx/.autorespond/*
Do these files get overwritten as well during upgrade?
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Originally posted by dgbaker
Using the chattr command you can stop cpanel from over writting the changes. But you also though lose any changes/updates from cpanel for those files.
Maybe, but /usr/local/cpanel/bin/autorespond is an encoded file, so I can't change it anyway.:(
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Check out the autoresponder in the bluelagoon theme. It is equipped with all that is needed. Thank you rvskin!!

cPanel.net Support Ticket Number: