Re: Different charset in mail

[email protected]
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <OF3CA52F6F.DE65D767-ONC1257107.0042D05D-C1257107.0043DD71@generic.se>
Ok!

I solved the problem by picking up the mailhost from the SettingsBean and
using javax/mail api . I used the setText method of the javax.mail.Message
class using the one with two arguments and
....
msg.setText(theMessage,"iso-8859-1");
....

The jahia MailService class does not use the second parameter and there is
no way to use any charsets other than Cp1252 which seems to be the default.

Regards
/Lars Hagrot



                                                                           
             Lars.Hagrot@gener                                             
             ic.se                                                         
                                                                        To 
             2006-01-30 13:58          [email protected]                  
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
             <[email protected]         Different charset in mail           
                    rg>                                                    
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




We are using the Jahia Mailservice Component from within a template (jsp).
Everything worked fine until a receiver using MS Exchange mail server told
us that the mail server refuses to receive the mails because of the header:
Content-Type : text/plain; charset=Cp1252


We have to elaborate with alternative charsets to find one that is accepted
by MS Exchange?!?!?! (and hopefully all other mail servers to).

I can use the javax/mail API and do this but I want to pick up the mailhost
from Jahia and that property is private in the Jahia Mailservice Component.
My plan is to try to use the JahiaData, ParamBean and SettingsBean  which
are request attributes and get the mailhost field.

My question is if somebody have had the same problem and came up with
another solution?

regards
/Lars Hagrot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.