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 7549029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:50:50+00:00 2026-05-30T09:50:50+00:00

I would like to interrogate all new emails (one by one) and find the

  • 0

I would like to interrogate all new emails (one by one) and find the contents of them so that I can use the contents for another application.

My first step was interpreting the return values from a search done via the search attr of an IMAP4 object. I’m trying to figure out what data is in a list that I have returned to me.
How can I examine the object tree via print? Or, better yet, how can I get the contents of the email in a string?

For ex., I am returned the following via print:
unseen email content: ['3 4'] from a variable named “response”.
If I run print response.__class__.__name__, I get “list” returned.

I know that there is other data in “3”, and “4”, I just don’t know what.

update: Specifically, this is the return of a call to an IMAP4obj.search(None, ‘(UNSEEN)’)

  • 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-30T09:50:51+00:00Added an answer on May 30, 2026 at 9:50 am

    from the python docs (here) this example:

    # M is a connected IMAP4 instance...
    typ, msgnums = M.search(None, 'FROM', '"LDJ"')
    

    it seems a tuple is returned, you can try,

    print(type(typ))
    print(dir(typ))
    print(type(msgnums))
    print(dir(msgnums))
    

    try reading the docs, see if it can help clarify your doubts or even make your question clearer.

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

Sidebar

Related Questions

Would like to group all header files in my project in one class ,so
Would like to make anapplication in Java that will not automatically parse parameters used
would like your comments. Eg: When user first visit www.testing.com/productdetailpage.asp I will use caching-
I would like to set up a table within a SQL Server DB that
I would like to have a generic Interpolator class which can interpolate between instances
would like to have a central place to register new signals, connect to signals,
Would like to be able to set colors of headings and such, different font
Would like to know what a programmer should know to become a good at
Would like to know the c# code to actually retrieve the IP type: Static
Would like to know how to integarate cruise control with maven? Cruise Control comes

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.