Link to home
Start Free TrialLog in
Avatar of rationalboss
rationalboss

asked on

Removing quoted text from an email

I'm parsing an email and I was able to extract the 'text/plain' and 'text/html' contents of the mail. My problem now is that I can't extract the 'actual text' from the the whole text (with q'uoted text'). Here's an example.

this is a reply

On Tue, Mar 1, 2011 at 6:32 PM, Jan Michael Chuaquico <
jmschuaquico@gmail.com> wrote:

> test
>
(gmail example)

I only want the 'this is a reply' and not the 'test'. This may be easy if all the emails have this format. But it varies depending on the email client. Here's an example from Yahoo!

test2




________________________________
From: Jewel Garcia
To: Jehaziel Jeiel Garcia
Sent: Tuesday, March 1, 2011 7:48:42 PM
Subject: subject


test

How am I going to solve this problem? Maybe you guys know of any existing classes that has solved this already? Thanks!
Avatar of Vimal DM
Vimal DM
Flag of India image

Hai,

"PHPMAILER" is the best one to process the mailing

1) Can send bulk mails
2) Can have bulk attachment
3) Can avoid spams,and the problems that you face on each different mail id's
4) Any type of mail id's will be accepted to the mailer class


just a single mailer class,and code that you know to use

it is available on net

Very Good Code
I'm guessing that you're referring to parsing the email in a PIPE script, right?  I have never seen any class that can do what you're describing here.  I think you are on the path of original research.  Unfortunately there are almost as many formats for forwarded and replied-to messages as there are email reader programs.

If you want to post the complete original messages with the headers for a few samples, I will be glad to look at them and try to make some generalized solutions.
ASKER CERTIFIED SOLUTION
Avatar of rationalboss
rationalboss

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rationalboss
rationalboss

ASKER

No solution was provided so I just made a more extensive Google search.