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

The Archive Base Latest Questions

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

I want to make pop3 client in PHP. I have a problem when I

  • 0

I want to make pop3 client in PHP.
I have a problem when I get all message (body + headers) I want to divide headers and body. Normally after headers there is a blank line and then there is a body of message. I realized that in one e-mail in my mailbox there are headers with a blank line:

    Delivered-To: asd@gmail.com
Received: by 10.239.164.198 with SMTP id u6cs311361hbd;
        Thu, 25 Feb 2010 08:11:16 -0800 (PST)
Received: by 10.223.6.27 with SMTP id 27mr1385919fax.31.1267114275670;
        Thu, 25 Feb 2010 08:11:15 -0800 (PST)
Return-Path: <elsa@homelidays.emv2.net>
Received: from emailer112-138.emv2.net (emailer112-138.emv2.net [81.92.112.138])
        by mx.google.com with ESMTP id 24si15703136fxm.76.2010.02.25.08.11.12;
        Thu, 25 Feb 2010 08:11:14 -0800 (PST)
Received-SPF: pass (google.com: domain of elsa@homelidays.emv2.net designates 81.92.112.138 as permitted sender) client-ip=81.92.112.138;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of elsa@homelidays.emv2.net designates 81.92.112.138 as permitted sender) smtp.mail=elsa@homelidays.emv2.net; dkim=pass (test mode) header.i=elsa@emv2.net
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=emv; d=emv2.net;
 h=Date:From:Reply-To:To:Message-ID:Subject:MIME-Version:Content-Type:List-Unsubscribe; i=elsa@homelidays.emv2.net;
 bh=6AAaS7MBmDZ4twficXpZISS03+k=;
 b=ShFzHF3jozT6joZ/O5JvKS6ECNwXfT+4XdWv+tgLCzsGFMiesKF4PxtCcrw/SnR9YyBa9I8BOUWj
   MjyJqGFPaA==
DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=emv; d=emv2.net;
 b=TyNSOdwDU8IJW1e4Iq6/TLj4QjyO/Leru+VFXAQSmJ+nVwdpHSIk7N5myHNNajhOu5yG7uQjAdoT
   I6QsJNDEjw==;
Received: by emailer112-138.emv2.net id hgqgi40hu6oc for <asd@gmail.com>; Thu, 25 Feb 2010 17:10:21 +0100 (envelope-from <elsa@homelidays.emv2.net>)
Return-Path: elsa@homelidays.emv2.net
Date: Thu, 25 Feb 2010 17:10:21 +0100 (CET)
From: "Homelidays.co.uk" <elsa@homelidays.emv2.net>
Reply-To:  <renter-service@homelidays.com>
To:  <asd@gmail.com>
Message-ID: <34216955106.7026379.1267114221347@schr1>
Subject: Spring sunshine & Easter escapes
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=702637934216955106
X-EMV-Platform: ccc.campaigncommander.com$
X-EMV-CampagneId: 7026379$
X-EMV-MemberId: 34216955106$
List-Unsubscribe: http://trc1.emv2.com/HD?a=DNX7Cq7R8H0N8SA9MKIk7THnGHxKDTNjXw76

--702637934216955106
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

               If you cannot see this message, please click here http://trc1.emv2.com/HM?a=DNX7Cq7R8H0N8SA9MKIk7THnGHxKDTNIDA6e



--702637934216955106
Content-Type: text/html; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
        <table cellspacing="0" cellpadding="0" width="650" align="center">
            <tr>
... and the rest of body...

How can I have body and headers separated messages with blank line inside?

  • 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-25T13:35:46+00:00Added an answer on May 25, 2026 at 1:35 pm

    For parsing a mail message, first you have to find where the headers end. This will be on the first blank line in the message.

    Once you have found that, you may have to parse the message itself. The reason for this is that you have presented a multi-part message, which is made of… multiple parts. Each part can have its own content type and what not. This is common for HTML e-mails, as well as e-mails with attachments.

    To find out how to parse the multi-part message, you need to look for the boundary identifier. This is outlined at the end of this header:

    Content-Type: multipart/alternative; boundary=702637934216955106
    

    Just split the message on the boundary, and deal with each part separately from there.

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

Sidebar

Related Questions

I want to make sure people can't type the name of a PHP script
I want to make sure that a set of functions have the same signature
If all tables I want to delete from have the column gamer_id can i
I want make freetype in my cygwin, after I input make command I:\freetype-2.4.4>make make:
I have a project and I want make smart pointers usage better. The main
I have an EDI form, I want make it more readable especially the naming
I have the following pointer: jfloat *verticesLocal; And I want make a new copy
i want make my button visible after matching some pattern into url every thing
I have a create.js.erb, I want make this: if the user click to create
I want to make a program for Android, what take all people who use

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.