#13465 [Com]: imap_fetchstructure problem
| From: | tm at bogs dot de | Date: | Wed, 22 Jan 2003 14:31:00 +0000 |
| Subject: | #13465 [Com]: imap_fetchstructure problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30920@lists.php.net to get a copy of this message | ||
ID: 13465
Comment by: tm@bogs.de
Reported By: seung_hwan@hotmail.com
Status: Bogus
Bug Type: IMAP related
Operating System: Red Hat 7.1 (Seawolf)
PHP Version: 4.0.6
New Comment:
I've found the following explanation for this problem
(although many mail clients interpret the content as html, imap do not
so, but it seems to be an error on side of the sender not of the
receiver):
"[...]
Once again, let me emphasize that "Content-Type: text/html" without
the
mandatory MIME-Version header is garbage. It violates both MIME and
the older
format."
See also:
-
http://www.faqchest.com/prgm/wuimap-l/imap-01/imap-0110/imap-011002/imap01103110_15803.html
-
http://www.faqchest.com/prgm/wuimap-l/imap-01/imap-0110/imap-011002/imap01103111_18907.html
-
http://www.faqchest.com/prgm/wuimap-l/imap-01/imap-0110/imap-011002/imap01103001_02507.html
Previous Comments:
------------------------------------------------------------------------
[2001-10-19 02:42:37] derick@php.net
If it is a bug (which I doubt), it's not a PHP bug, but a bug in the
library that the imap extension used. I recommend to check this out
with the imap guys.
Not a PHP bug > bogus.
------------------------------------------------------------------------
[2001-10-19 00:00:16] seung_hwan@hotmail.com
Nobody knows how to solve this problem???
------------------------------------------------------------------------
[2001-09-26 22:05:51] seung_hwan@hotmail.com
The list of modules I compiled PHP with:
./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-imap=/usr/local/imap \
--with-language=korean \
--with-charset=euc_kr \
--with-zlib \
--enable-track-vars \
--disbale-debug \
--enable-modules=so \
--with-config-file-path=/usr/local/apache/conf \
My server environments:
OS - Red Hat 7.1
PHP - 4.0.6
qmail - 1.03
imap - 4.7
apache - 1.3.20
mysql - 3.23.39
If a mail header contains 'Mime-Version: 1.0', imap_fetchstructure
works ok.
However If not, imap_fetchstructure always returns the type value as
text and the subtype value as plain.
For example, suppose I receive the following mail.
x-sender: anonymous@myonair.com
x-receiver: ksh@tkdz.com
Received: from myonair.com by gaultier with Microsoft
SMTPSVC(5.0.2172.1);
Tue, 25 Sep 2001 11:34:08 +0900
Received: (qmail 31008 invoked by uid 99); 25 Sep 2001 11:39:49
+0900(KST)
Date: 25 Sep 2001 11:39:49 +0900(KST)
Message-ID: <20010925113949.31007.qmail@myonair.com>
To: ksh@tkdz.com
Subject: test
From: admin@myonair.com
Content-Type: text/html; charset=ks_c_5601-1987
Return-Path: anonymous@myonair.com
X-OriginalArrivalTime: 25 Sep 2001 02:34:08.0868 (UTC)
FILETIME=[8DAA4240:01C1456A]
<iframe frameborder="0" scrolling="no" topmargin="0"
leftmargin="0"
src="http://mail.myonair.com/letter/mail_to.html?user_no=2"
width="620"
height="450"></iframe>
The mail content type is text/html, but imap_fetchstructure returns the
content type as text/plain because there is not 'Mime-Version: 1.0' in
the mail header.
If the mail header contains 'Mime-Version: 1.0', imap_fetchstructure
works properly.
Is this a kind of bug?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13465&edit=1