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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:00:28+00:00 2026-05-23T23:00:28+00:00

this is the content of one mail read by imap_php library. I would extract

  • 0

this is the content of one mail read by imap_php library.
I would extract the content-type text/plain; charset=ISO-8859-1 text:

{"data":"10/10/2011","regione":"pt","provincia":"pistoia","nome":"nome","tel":"12345","email":"mymailaddress","richiesta":"qualcosa"}

If I use imap_body($mbox, $result[0]) i have returned all the text in the box.
If I use imap_fetchbody($mbox,$email_number,2); I have returned the text/html body message that i don’t want.

–20cf301e2f27a218c204a88578aa Content-Type: text/plain;
charset=ISO-8859-1
{“data”:”10/10/2011″,”regione”:”pt”,”provincia”:”pistoia”,”nome”:”nome”,”tel”:”12345″,”email”:”mymailaddress”,”richiesta”:”qualcosa”}

–20cf301e2f27a218c204a88578aa Content-Type: text/html;
charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
{“data&= quot;:”10/10/2011″,”regione”:”pt”,”provi=
ncia”:”pistoia”,”nome”:”nome”,”tel&=
quot;:”12345″,”email”:”mymailaddress”,”r= ichiesta”:”qualcosa”}
–20cf301e2f27a218c204a88578aa–

So what I have to use if I want the text/plain body?
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-23T23:00:28+00:00Added an answer on May 23, 2026 at 11:00 pm

    You need to use 1.1 as the section argument to fetch_body()
    For example:

    $message = imap_fetchbody($inbox,$email_number, 1.1);
    

    How to use IMAP in PHP to fetch mail body content?

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

Sidebar

Related Questions

I have a Drupal setup like this: Content type: Apartments Vocabulary: Areas , that
I'm using Zend_View to template text email content. However, I've come across one problem
I have a text file, its the content from a mail body.it includes html
I have a piece of code VERY similar to this one http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#JavaMailFetching I the
I found this content expand/collapse jQuery plugin. I want to add fade-in effect to
I'm getting an error for this content template within a style: Must specify both
I have a String with this content: href=http://www.website.com/ /> [...] [...] I just want
I'm working on an application that gets content from feeds in C#. This content
I want to apply cycle to the div block with dynamic content. This content
I have a flex app which allows user to create some content. this content

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.