Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:46:48+00:00 2026-05-13T13:46:48+00:00

I’m writing some code to parse forwarded emails. What I’m not sure is if

  • 0

I’m writing some code to parse forwarded emails. What I’m not sure is if maybe there is some Python library, some RFC I could stick to or some other resource that would allow me to automate the task.

To be precise, I don’t know if the “layout” of forwarded emails is covered by some standard or recommendation, or if it has just evolved over the years so now most email clients produce similar output for the text part:

    Begin forwarded message: 

    > From: Me <me@me.me>
    > Date: January 30, 2010 18:26:33 PM GMT+02:00
    > To: Other Me <other-me@me.me>
    > Subject: Unwise question

— and go wild for attachments (and whatever other MIME sections can be there).

If it’s still not precise enough I’ll clarify it, it’s just that I’m not 100% sure what to ask about (RFC, Python lib, convention or something else).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:46:48+00:00Added an answer on May 13, 2026 at 1:46 pm

    In my experience just about ever email client forwards/replies differently. Typically you’ll have a plain text version and a html encoded version in the mime at the bottom of the mail pack. Mail headers do have a RFC (http://www.faqs.org/rfcs/rfc2822.html “2822”), but unfortunately the content of the message body is out side the scope.

    Not only do you have to contend with the mail client variance, but the variance of user preferences. As an example: Lotus Notes puts replies at the top and Thunderbird replies at the bottom. So when a Thunderbird user is replying to a Lotus Notes user’s reply they might insert their reply at the top and leave their signature at the bottom.

    Another pitfall maybe contending with word wrapping of replied chains.

    >>>> The outer reply that goes over the limit and is word wraped by
    the middle replier’s mail client\n
    >> The message body of a middle reply
    > Previous reply
    Newest reply

    I wouldn’t parse the message and leave it to the user to parse in their heads. Or, I’d borrow the code from another project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 387k
  • Answers 387k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just did this off the top of my head List<int>… May 15, 2026 at 12:09 am
  • Editorial Team
    Editorial Team added an answer You should take a look into e.AllowedEffect if DragDropEffects.Copy is… May 15, 2026 at 12:09 am
  • Editorial Team
    Editorial Team added an answer I figured out a simple solution. I just set a… May 15, 2026 at 12:09 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.