php pop3 附件,php – 如何从POP3电子邮件中提取数据?

我从

PHP收到POP3服务器的电子邮件.我有一个包含标题和正文的原始字符串.如何以类或数组的形式解析标题和正文?

我的例子:

Return-path: Envelope-to: x@x.de Delivery-date:

Wed, 06 Feb 2013 09:35:37 +0100 Received: from mail by

host6.toxpress.com with spam-scanned (Exim 4.80.1) (envelope-from ) id

1U30Tc-0003sH-LQ for x@x.de; Wed, 06 Feb 2013

09:35:36 +0100 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06)

on host6.toxpress.com X-Spam-Level: X-Spam-Status: No, score=-1.9

required=5.0 tests=BAYES_00,FREEMAIL_FROM,

RCVD_IN_DNSWL_NONE,TVD_SPACE_RATIO autolearn=ham version=3.3.2

Received: from moh3-ve2.go2.pl ([193.17.41.86] helo=moh3-ve1.go2.pl)

by host6.toxpress.com with esmtp (Exim 4.80.1) (envelope-from ) id

1U30Tc-0003rk-2b for x@x.de; Wed, 06 Feb 2013

09:35:32 +0100 Received: from moh3-ve1.go2.pl (unknown [10.0.0.157])

by moh3-ve1.go2.pl (Postfix) with ESMTP id BC734AF611B for ; Wed, 6

Feb 2013 09:34:31 +0100 (CET) Received: from unknown (unknown

[10.0.0.108]) by moh3-ve1.go2.pl (Postfix) with SMTP for ; Wed, 6 Feb

2013 09:34:31 +0100 (CET) Received: from

43.dynamic.chello.pl [89.69.42.127] by poczta.o2.pl with

ESMTP id jtIGfv; Wed, 06 Feb 2013 09:34:31 +0100 Message-ID:

<51121593.3090008@o2.pl> Date: Wed, 06 Feb 2013 09:34:27 +0100 From:

Tomasz Reply-To: tomasz_smykrowski@o2.pl Organization: Tomasz

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101

Thunderbird/20.0a2 MIME-Version: 1.0 To: x@x.de

Subject: adaads Content-Type: text/plain; charset=ISO-8859-1;

format=flowed Content-Transfer-Encoding: 7bit X-O2-Trust: 2, 64

X-O2-SPF: neutral dsadasdsaas .

而我希望能够做到的:

echo $from;

echo $replyTo;

echo $date;

echo $body;

echo $subject;

echo $charset;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值