Mail parsing with PHP
Posted: Tue Jul 08, 2008 11:19 am
I have the "raw" email string: -
Now, I want to parse the mail. What is the best way to do it?
I was able to do it very efficiently in python's email.Parser class
Code: Select all
Received: by 10.142.82.7 with HTTP; Tue, 8 Jul 2008 03:25:54 -0700 (PDT)
Message-ID: <a415f8dd0807080325v14f2ee59o7a9a37e51a3bbc6f@mail.gmail.com>
Date: Tue, 8 Jul 2008 15:55:54 +0530
From: "User Name" <user@example.com>
To: "User Name" <user@example.com>
Subject: Hi
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Delivered-To: user@example.com
My messageI was able to do it very efficiently in python's email.Parser class