我正在做这个管道 php 脚本来获取到达的电子邮件并解析它并显示它。我使用了本教程:http ://www.damnsemicolon.com/php/parse-emails-in-php-with-email-piping-part-1 (以及以下),我使用标准电子邮件进行了尝试已经发送到我的服务器,它运行良好,但后来我尝试了另一个,我得到了很多错误。我使用了 print_r($decoded); 向我展示电子邮件的所有不同部分,而不是获得完全解析的电子邮件,电子邮件的所有内容都转到 $decode[0]['body]; 为什么会这样?(我不会发布代码,因为它与教程相同)
print_r($decode)= Array (
[0] => Array (
[Headers] => Array ( )
[Parts] => Array ( )
[Position] => 0
[Body] => From jtferreira@teste.local Thu Apr 26 12:33:44 2012 Received: from [192.168.1.92] by ubuntuserver.lan with esmtp (Exim 4.76) (envelope-from ) id 1SNMxE-0000VB-TR for jtferreira@teste.local; Thu, 26 Apr 2012 12:33:44 +0100 Message-ID: <4F993299.8040605@teste.local> Date: Thu, 26 Apr 2012 12:33:45 +0100 From: =?ISO-8859-1?Q?=22Jo=E3o_Ferreira_=28m=E1quina_virtual=29=22?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: jtferreira@teste.local Subject: Sample Email Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit It's the same?
[BodyPart] => 1
[BodyLength] => 744
)
)
谢谢。