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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:12:23+00:00 2026-05-20T00:12:23+00:00

I am working on a IMAP, so just reading the body (body[header.fields (DATE FROM

  • 0

I am working on a IMAP, so just reading the body (body[header.fields (DATE FROM SUBJECT)]) I am passing this command.

But problem is like there some time my string return extra stuff excetp from my original string.
and some times I had getting limited part of the string means half part of the body.
so whenever I am passing second command it will accept as a first command and return result as the
first command pending resul.;

so the my concern is that I am not able to retrive proper data as of the part of the body.

as per my knowladge I think it’s happen due to the internet datapacket tresfersize, but apart from this look at outlook or any other mail manager will work properly so what this is the mechanisam for
this data retriving.

or anything else to do fo my coding…..

Thanks..

  • 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-20T00:12:24+00:00Added an answer on May 20, 2026 at 12:12 am

    Posting a sample response from the IMAP server that contains the “extra stuff” would help.

    The problem you are most likely facing is with untagged server responses.

    Heres what RFC3501 says:

    Status responses can be tagged or untagged. Tagged status responses indicate the completion result (OK, NO, or BAD status) of a client command, and have a tag matching the command:

    C: a002 NOOP
    S: a002 OK NOOP completed
    

    Some status responses, and all server data, are untagged. An
    untagged response is indicated by the token “*” instead of a tag.

    C: a047 NOOP
    S: * 22 EXPUNGE
    S: * 23 EXISTS
    S: * 3 RECENT
    S: * 14 FETCH (FLAGS (\Seen \Deleted))
    S: a047 OK NOOP completed
    

    So you need to distinguish between those 2 response types.

    Please remember that checking if every received line starts from ‘*’ character is not enough, as your email message may also have lines starting from star character:

    C:    a004 fetch 12 body[header]
    S:    * 12 FETCH (RFC822 {342}
    S:    Date: Wed, 17 Jul 1996 02:23:25 -0700 (PDT)
    S:    From: Terry Gray <gray@cac.washington.edu>
    S:    Subject: IMAP4rev1 WG mtg summary and minutes
    S:    MIME-Version: 1.0
    S:    
    S:    * This is email body containing start char
    S:    )
    S:    a004 OK FETCH completed
    

    {342} is the exact number of bytes you are supposed to read.

    The bottom line is don’t reinvent the wheel use existing library.

    You can check out mine IMAP component (not free).

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

Sidebar

Related Questions

Ok this is probably just me not knowing enough about php but here it
I am currently using an imap stream to get emails from an inbox. Everything
I've just started creating Unit Tests for my code again. I have had PHPUnit
We have written an Outlook add-in in C#, that appends a custom header to
Im working with libetpen for the last 2 days and trying to compile it
I am working on a mail client Application for downloading gmail emails, which uses
I am in the process of working on a perl script that will connect
I am creating a web-based IMAP client in Rails, and want to cache the
I am extracting emails from Gmail using the following: def getMsgs(): try: conn =

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.