Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Troubleshooting and Problems

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 07-03-2009, 04:02 PM
Kekurikekaka Kekurikekaka is offline
Junior Member
 
Join Date: Feb 2009
Posts: 3
Default

How can i get this to work on the newest version of OsTicket? There the class.pop3.php isnt in use.
Reply With Quote
  #42  
Old 01-09-2010, 01:46 PM
paralize paralize is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default

Would be interested in a solution for the newer v1.6 RC5 version where the class.pop3.php is not in use any more?

Clients get the Emails where special chars like ÄÖÜ are shown crypted like described in previous posts.

Has anybody worked this out so far?
Reply With Quote
  #43  
Old 03-02-2010, 06:47 AM
dominox dominox is offline
Junior Member
 
Join Date: Mar 2010
Posts: 9
Default

Hi Guys,

i'm pretty sure that the following is not the best solution, but after trying for several hours now (too bad, i'm not a PHP programmer and i have to use a lot of try & error), i am happy with the second best solution now...

First, open the include/class.mailfetch.php and find the following:
PHP Code:
//Generic decoder - mirrors imap_utf8
    
function mime_decode($text) {

        
$a imap_mime_header_decode($text);
        
$str '';
        foreach (
$a as $k => $part)
            
$str.= $part->text;
        
        return 
$str?$str:imap_utf8($text);
    } 
Replace the Function with the following:

PHP Code:
//Generic decoder - mirrors imap_utf8
    
function mime_decode($text) {

        
$a imap_utf8($text);
        
$str '';
        foreach (
$a as $k => $part)
            
$str.= $part->text;
        
        return 
$str?$str:imap_utf8($text);
    } 
That is solving the incoming mails, at least for me.

Now for outgoing, go to include/class.email.php and look for the following (Line 135):
PHP Code:
function send($to,$subject,$message,$attachment=null) {
        global 
$cfg;

        
//Get SMTP info IF enabled!
        
$smtp=array();
... 
I've added 3 lines to that like followed (after the global $cfg definition):
PHP Code:
function send($to,$subject,$message,$attachment=null) {
         global 
$cfg;

      
// the following 3 lines replace the german umlauts
      
$umlaute = array('ä''ö''ü''ß''Ä''Ö''Ü');
      
$ersetze = array('ae''oe''ue''ss''Ae''Oe''Ue');
      
$subject str_replace($umlaute$ersetze$subject);

        
//Get SMTP info IF enabled!
        
$smtp=array();
... 
This one converts all german umlauts in the Subject line with "ae", "oe" etc., this is not the best solution but it works. Even with someone answers to the ticket via email.

Hopefully there will be a correct implementation of that whole thing in a upcoming version.
Reply With Quote
  #44  
Old 03-07-2010, 04:39 AM
lectar lectar is offline
Junior Member
 
Join Date: Mar 2010
Posts: 2
Default

Thanks for Dominox.

with russian letters its working fine but new trule was detected:

if SUBJECT contain letters in more that 1 language, f.e. RU and EN, in control panel shown only russian (uppercase only). English letters is missing.

Any ideas about it?
Reply With Quote
  #45  
Old 03-11-2010, 11:25 AM
lectar lectar is offline
Junior Member
 
Join Date: Mar 2010
Posts: 2
Default

thanks to dominox.

Problem was solved.
Reply With Quote
  #46  
Old 06-28-2010, 08:00 AM
tcvitan tcvitan is offline
Junior Member
 
Join Date: Jun 2010
Posts: 3
Default Small addition

Thanks for your solution, dominox, it helped me with the incoming email. I have found that there is a proper solution for outgoing email.

The problem turns out to be that the implementation of the PEAR mime-class in class.email.php is not containing the 'head_charset' variable, and thus the system falls back to the default value, which is ISO-8859-1. This is simply fixed by adding 'head_charset' => 'utf-8', in the list at lines 175-179 in class.email.php.

The new list should looks like this:

$options=array('head_encoding' => 'quoted-printable',
'text_encoding' => 'quoted-printable',
'html_encoding' => 'base64',
'head_charset' => 'utf-8',
'html_charset' => 'utf-8',
'text_charset' => 'utf-8');

I have reported this bug to the osTicket team.
Reply With Quote
  #47  
Old 06-29-2010, 04:03 AM
tcvitan tcvitan is offline
Junior Member
 
Join Date: Jun 2010
Posts: 3
Default

Some versions of PHP have a bug where imap_utf8() returns the string in capital letters, I guess this is why the mime_decode function exists. I have changed it so that it actually work, with help from a comment on the php help page for imap_utf8().

I have added a zip file with the changes needed for getting both incoming and outgoing email headers to work properly.
Attached Files
File Type: zip osTicket-1.60-email_header_fix.zip (9.0 KB, 322 views)
Reply With Quote
  #48  
Old 07-14-2010, 02:42 PM
openstream openstream is offline
Junior Member
 
Join Date: Jul 2010
Posts: 1
Default

I found a very easy solution to this problem by simply setting AddDefaultCharset to utf-8 in my (Apache) virtual host config.

The global setting in /etc/apache2/conf.d/charset on this particular server is AddDefaultCharset ISO-8859-1, so because I need that setting for other applications I only changed it in the virtual host scope.

If you don't have access to your virtual host config you might still be able to set this via .htaccess if your hosting provider allows it.
Reply With Quote
  #49  
Old 03-28-2011, 09:33 AM
com_tom com_tom is offline
Junior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 14
Default

I have tried dominox, tcvitan and openstream bugfixes, but without luck

All incomming emails are truncated on the first german umlaut.

What else can I check to get this working? Thanks in advance.
Reply With Quote
  #50  
Old 04-05-2011, 08:14 AM
com_tom com_tom is offline
Junior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 14
Default

I have worked on that issue several days now. I have read a lot of posts, made some bug fixes, but it does not work at all. In some cases special chars (like german umlauts) work correct, but unfortunately not in all.


I used a popular german email provider (web.de) to send the following Text:
Quote:
Umlaute Test: ä Ö ü und auch ß
Sending Text-Email with special chars works perfekt. Received:
Quote:
Umlaute Test: ä Ö ü und auch ß
Part of the email header:
Quote:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Sending Design-Email with special chars does not work. Received:
Quote:
Umlaute Test:
Part of the email header:
Quote:
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Any idea where to fix this issue?

Last edited by com_tom; 04-05-2011 at 08:46 AM.
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:28 AM.