The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mail encoding problem in autoresponder

Discussion in 'E-mail Discussions' started by myweb, Apr 2, 2003.

  1. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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?
     
  2. torwill

    torwill Well-Known Member

    Joined:
    Jun 25, 2002
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    i have the same problem.... no matter what char set i select... it all go back to us-ascii

    is there a way to fix it?
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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...
     
  4. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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.
     
  6. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
  7. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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.
     
  8. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
    #8 myweb, May 8, 2003
    Last edited: May 8, 2003
  9. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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.
     
    #9 casey, May 8, 2003
    Last edited: May 8, 2003
  10. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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.
     
  11. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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
     
  12. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Crap. I shoulda kept my mouth shut.:)
    Well, let me repeat the original question, because now I need the answer, too!

     
  13. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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.
     
  14. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    I got a really fast response from cpanel support, but it was not one that I wanted to hear:

    I guess he's telling me that I can't change it, right?
     
  15. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    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.
     
  16. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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?
     
  17. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Not that I am aware of I think they are left alone. Most of the updates that cpanel does do not touch users home areas.
     
  18. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Maybe, but /usr/local/cpanel/bin/autorespond is an encoded file, so I can't change it anyway.:(
     
  19. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Check out the autoresponder in the bluelagoon theme. It is equipped with all that is needed. Thank you rvskin!!

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page