Made In China Talk  

Go Back   Made In China Talk > International Business Talk > Import > Fashion & Accessories
Directory Register FAQ Members List Calendar Mark Forums Read 中文




Is there a method for converting text files to email?


Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2009, 02:54 AM
Joel Joel is offline
Junior Member
 
Join Date: Jun 2008
Posts: 727
Feedback: (0)
Default Is there a method for converting text files to email?

At my company we used to have some sort of legacy email system (long before my time), which when they sunset it they exported all of the messages (1MM+) to plain text files. What I would like to do would be to find some way to convert these text files to some sort of MAPI compliant form that can be imported into our compliance archive. Since these are simply text files we would have to parse senders/recipients, subject, dates, and body out of the text and input it (with lots of predefined defaults) into a message template (msg format?). Any ideas how/if this could be done in some sort of automated fashion?Here is a sample:Message-ID: <18782231.1075855354110.JavaMail.odds@rosmary>Date : Mon, 14 May 2001 14:39:00 -0700 (PDT)From: phillip.Morris@company.comTo: tim.doe@company.comSubject: Financial ReportingMime-Version: 1.0Content-Type: text/plain; charset=us-asciiContent-Transfer-Encoding: 7bitX-From: Phillip MorrisX-To: Tim Doe <Tim Doe/Company@CompanyXGate>X-cc: X-bcc: X-Folder: \Phillip_Morris_Jan2002_1\Allen, Morris\'Sent MailX-Origin: Morris-PX-FileName: EmailArchive.MB001Please find the important numbers below
Reply With Quote




  #2  
Old 07-06-2009, 02:54 AM
Caribbean Caribbean is offline
Senior Member
 
Join Date: Dec 2008
Posts: 1,440
Feedback: (0)
Default Is there a method for converting text files to email?

If there was any sort of delimiter between the messages, such as some asterisks or something, you could parse it in a php script, if you try using explode().Suppose this is what your text file looks like<header1><subject1><message1><header2><subject 2><message2><header3><subject3><message3>If the delimiter was there, it would look sort of like...<header1>***<subject1>***<message1>***<head er2>***<subject2>***<message2>***<header3>***<subj ect3>***<message3>***Then if you were to $message = explode ("***", <messages>);Then you can do whatever you want with the array. $message[0] will contain <header1>. $message[1] will contain <subject1>, and so on.
Reply With Quote
  #3  
Old 07-06-2009, 02:54 AM
Englo Englo is offline
Senior Member
 
Join Date: Jun 2008
Posts: 1,969
Feedback: (0)
Default Is there a method for converting text files to email?

You could do it with any old scripting language. However, we'd need to see samples of the messages, get a description of the platform on which they are stored and where you plan to store the messages, to tell you how to do it.
Reply With Quote
Reply



Thread Tools
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


| Business Forum | Toronto Chinese

All times are GMT +9. The time now is 02:25 AM.


All rights reserved. Copyright © 2007 Made In China Talk