Здраствуйте! Помогите понять в чем проблема? Функция imap_fetchbody по протоколу POP3 возвращает части, а по IMAP не возвращает. Код: PHP: <?php $UserName = "inst88993@mail.ru"; $PassWord = "inst889931"; $ServerName = "{pop.mail.ru:110/pop3}"; $mbox = imap_open($ServerName, $UserName,$PassWord) or die("Fack"); for($x=0;$x<3;$x++) { $body=imap_fetchbody($mbox,1, $x); print $x."===========================\n".$body; } imap_close($mbox); $ServerName = '{imap.mail.ru:143/imap/novalidate-cert/norsh}'; $mbox = imap_open($ServerName, $UserName,$PassWord) or die("Fack"); for($x=0;$x<3;$x++) { $body=imap_fetchbody($mbox,1, $x); print "\n".$x."===========================\n".$body; } imap_close($mbox); ?> Вот результат: Код (Text): [root@evil docs]# php test.php 0=========================== From inst88993@mail.ru Fri Apr 02 22:31:01 2010 Return-path: <inst88993@mail.ru> Received: from mail by f249.mail.ru with local id 1NxldT-0005qv-00 for inst88993@mail.ru; Fri, 02 Apr 2010 22:30:27 +0400 Received: from [95.26.212.98] by win.mail.ru with HTTP; Fri, 02 Apr 2010 22:30:27 +0400 From: inst88993 inst88993 <inst88993@mail.ru> To: inst88993@mail.ru Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [95.26.212.98] Date: Fri, 02 Apr 2010 22:30:27 +0400 Reply-To: inst88993 inst88993 <inst88993@mail.ru> Content-Type: multipart/mixed; boundary="----Kc1sZrhX-H1Gs6JJk1YGpk15G:1270233027" Message-Id: <E1NxldT-0005qv-00.inst88993-mail-ru@f249.mail.ru> X-Spam: Not detected X-Mras: Ok 1=========================== ������ ����������� ��������-��������� �� ������@Mail.Ru http://r.mail.ru/cln4267/torg.mail.ru/ 2=========================== /9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcg (вырезано) Код (Text): ttBaQrDawxwRL91I1CqPoBRRWsYxjsjx6+Lr4l3rTcvVt/mS0UUVRzhRRRQAUUUUAFFFFABRRRQA UUUUAFFFFAH/2Q== 0=========================== From inst88993@mail.ru Fri Apr 02 22:31:01 2010 Return-path: <inst88993@mail.ru> Received: from mail by f249.mail.ru with local id 1NxldT-0005qv-00 for inst88993@mail.ru; Fri, 02 Apr 2010 22:30:27 +0400 Received: from [95.26.212.98] by win.mail.ru with HTTP; Fri, 02 Apr 2010 22:30:27 +0400 From: inst88993 inst88993 <inst88993@mail.ru> To: inst88993@mail.ru Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [95.26.212.98] Date: Fri, 02 Apr 2010 22:30:27 +0400 Reply-To: inst88993 inst88993 <inst88993@mail.ru> Content-Type: multipart/mixed; boundary="----Kc1sZrhX-H1Gs6JJk1YGpk15G:1270233027" Message-Id: <E1NxldT-0005qv-00.inst88993-mail-ru@f249.mail.ru> X-Spam: Not detected X-Mras: Ok 1=========================== 2=========================== [root@evil docs]#