如何删除电子邮件标题?

Nat*_*pos 0 email perl

我学习Perl并为家人做一个自制项目(订阅项目).使用Net :: POP3的Perl应用程序连接到我的邮箱并将我的所有电子邮件保存到文件(Mail.txt).当我打开这个文件时,我看到了很多垃圾,如下所示.我能做些什么来消除这个?谢谢.

Return-Path: 
Received: from [unix socket] by embro.tpn.terra.com (LMTP); Sun, 11 Oct 2009 04:09:50
    +0000 (UTC)
X-Abaca-Spam: 153
X-Terra-Karma: -2%
X-Terra-Hash: 2c7d32f717e807b11af5c0871edb9e93
Received-SPF: pass (embro.tpn.terra.com: domain of linuxquestions.org designates
    208.101.3.244 as permitted sender) client-ip=208.101.3.244;
    envelope-from=forum@linuxquestions.org; helo=sql02.linuxquestions.org;
Received: from sql02.linuxquestions.org (smtp.linuxquestions.org [208.101.3.244])
    by embro.tpn.terra.com (Postfix) with ESMTP id 14EA1580000A2
    for ; Sun, 11 Oct 2009 04:09:49 +0000 (UTC)
Received: from web02.linuxquestions.org (web02-be.linuxquestions.org [10.13.156.4])
    by sql02.linuxquestions.org (8.13.8/8.13.8) with ESMTP id n9B49mXe005694
    for ; Sun, 11 Oct 2009 00:09:48 -0400
DomainKey-Signature: a=rsa-sha1; s=smtp; d=linuxquestions.org; c=simple; q=dns;
    b=Le/RccpkHMfH426hLwlLkIbCujr0LiWKM32ryuZ1fWwYU6VjCTocd30N/JAg+w77d
    54VJkNnpA18iQxJ/yfKyQ==
Received: from web02.linuxquestions.org (localhost.localdomain [127.0.0.1])
    by web02.linuxquestions.org (8.13.8/8.13.8) with ESMTP id n9B49m2f027957
    for ; Sun, 11 Oct 2009 00:09:48 -0400
Received: (from nobody@localhost)
    by web02.linuxquestions.org (8.13.8/8.13.8/Submit) id n9B49mNn027956;
    Sun, 11 Oct 2009 00:09:48 -0400
Date: Sun, 11 Oct 2009 00:09:48 -0400
To: nathanpc@terra.com.br
Subject: "What programs would you like to see ported to Linux?" update
From: "LinuxQuestions.org" 
Auto-Submitted: auto-generated
Message-ID: 
X-Priority: 3
X-Mailer: LQ Mailer
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
Status: O

Dear nathanpc,

小智 5

这不是垃圾.这是电子邮件标题.例如,使用Mail :: Message来解析它.像这样的东西:

my $msg_obj = Mail::Message->read($rawdata); my $body = $msg_obj->body;
Run Code Online (Sandbox Code Playgroud)

  • 这些天孩子们被隐藏所有标题的图形电子邮件查看器宠坏了...... :) (5认同)