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 > General Discussions

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-27-2010, 04:49 AM
gertkh gertkh is offline
Junior Member
 
Join Date: Apr 2010
Posts: 1
Default Convert Outlook mails to txt

Hi

We did have huge problems converting Outlook mail into txt with the original code.

We did find a class from http://www.chuggnutt.com/html2text.php that did the trick.

We modified class.mailfetch.php the following way:

1. Upload the class.html2text.inc to the /include folder
2. Make the following changes to the class.mailfetch.php
PHP Code:
require_once(INCLUDE_DIR.'class.mailparse.php');
require_once(
INCLUDE_DIR.'class.ticket.php');
require_once(
INCLUDE_DIR.'class.dept.php'); 
add
PHP Code:
require_once(INCLUDE_DIR.'class.html2text.inc'); 
Change the function getBody to
PHP Code:
function getBody($mid) {
        
        
$body ='';
        if(!(
$body $this->getpart($mid,'TEXT/PLAIN',$this->charset))) {
            if((
$body $this->getPart($mid,'TEXT/HTML',$this->charset))) {
                  
$h2t =& new html2text($body);
                  
$body $h2t->get_text();
            }
        }
        return 
$body;
    } 
We hope that this could help others with the same problem.

Regards
Gert Kaae Hansen
Kjaerulff1.com
Reply With Quote
  #2  
Old 06-04-2012, 08:44 PM
kyle4812 kyle4812 is offline
Junior Member
 
Join Date: Oct 2009
Posts: 9
Default

Thanks, works well !
Just had an issue after moving to Exchange 2010 where the emails wernt fully coming though as a ticket.
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 06:10 PM.