taking mail into text boxes
<p>I've written a function in java to get this. On the reception of an e-mail I'm storing the contents of the mail into an external file  </p>

<pre><code>MIME-Version: 1.0 Received: by 10.216.237.25 with SMTP id       x25mr3166819weq.30.1346350346502; Thu, 30 Aug 2012 11:12:26 -0700 (PDT)Received: by 10.216.123.197 with HTTP; Thu, 30 Aug 2012 11:12:26 -0700 (PDT)Date: Thu, 30 Aug 2012 20:12:26 +0200 Message-ID: &lt;CAEE+wmOpUFC9Nb9wNAVKsCrFRX7GmDwhDya4brB=hvRHXY6q7Q@mail.gmail.com&gt; Subject: ok, lets see ... From: ABCD DEFG &lt;xyz@gmail.com&gt; To: XYX &lt;xyz@yahoo.com&gt;, def@gmail.com Content-Type: multipart/alternative; boundary=000e0cd5f7142581b204c87f9ed5 X-Processed-By: mx3.mail.genotec.ch X-Spam-Checksum: a84a5db7738f685c28343edc93a6546a X-Greylist: Sender IP 209.85.212.179 not delayed X-Spam-Report: ---- Start der SpamAssassin Auswertung  -1.0 ALL_TRUSTED  Passed through trusted hosts only via SMTP    -0.1 SPF_PASS               SPF: sender matches SPF record   0.0 HTML_MESSAGE           BODY: HTML included in message
    -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                                domain
    -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
     0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
    ---- Ende der SpamAssassin Auswertung X-GIC-MailScanner-SpamScore: -1.199
X-GIC-MailScanner-SpamCheck: ham, hits=-1.199 required=10 scantime="4.74 seconds" origip=209.85.212.179  X-Scanned-By: "MGate 1.0" on 82.195.224.57 
--000e0cd5f7142581b204c87f9ed5  Content-Type: text/plain; charset=ISO-8859-1
hello worldli ...  --000e0cd5f7142581b204c87f9ed5 Content-Type: text/html; charset=ISO-8859-1  hello worldli ... --000e0cd5f7142581b204c87f9ed5--
</code></pre>

<p>As we can see it not aligned .. I'd like to sort the data according to SENDER, RECEIVER, ACTUAL CONTENTS OF AN EMAIL, DATE (in short I want only SENDER, RECEIVER, DATE, ACTUAL DATA that's all).... how can I achieve this using JAVASCRIPT. Other unnecessary things should be avoided.... and have to display the fetched data in text-boxes ..
Let's say four text-boxes for  four fields...</p>
