Solved

Removing quoted text from an email

Posted on 2011-03-01
4
1,067 Views
Last Modified: 2012-05-11
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!
0
Comment
Question by:rationalboss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Expert Comment

by:Vimal DM
ID: 35008877
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
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35011641
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.
0
 
LVL 8

Accepted Solution

by:
rationalboss earned 0 total points
ID: 35052352
0
 
LVL 8

Author Closing Comment

by:rationalboss
ID: 35107001
No solution was provided so I just made a more extensive Google search.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question