Re: ->get('From') vs. ->Sender vs. From:

"Roderick A. Anderson" <[email protected]> Thu, 9 Jun 2005 12:57:34 -0700 (PDT)
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <[email protected]>
On Thu, 9 Jun 2005, Mark Overmeer wrote:

> A little bit about header fields:
> 
>   $msg->head->get('Field')
>   $msg->get('Field')          # abbreviation
>      returns the real field, as Mail::Message::Field::Fast object
>      (stringifies as its field content)
> 
>   $msg->head->study('Field')
>   $msg->study('Field')        # abbreviation
>      returns a Mail::Message::Field::Full, understands character
>      encodings, comments etc.  Slower but more precise
> 
>   $msg->from  ->to  ->subject  etc
>      simplifications, smart behavior.    Only the field data as
>      string.
> 
> Once upon a time,  $msg->from  returned the  Resent-From  fields, as you
> suggest should be used (if I understand the email correctly), but that
> is not according to the RFCs, so was changed.  A reply should always be
> addressed to the real "From" or "Sender".

So is there anyway to get the message's F, r, o, m, space ( this 
according to "man 5 mbox" using Mail::Box?

I don't need it to do any replying but rather for some software that uses 
it instead of the From: line.  Several , what appears to be email-list 
services , are sending from a different server/address than the From: line 
says and this software I'm dealing with uses the "From _envsender_ 
_date_ moreinfo" line se I need to report that instead of the From: line.

A real example is Borders Bookstores.  They send a newletter with a From: 
like this "[email protected]" but the envelope has 
"[email protected]"

> See also Mail::Message::Head::ResentGroup

I think that's where I found the "->set(from => '[email protected]')" method 
-- using the html version of the docs :-).  Seems if we can set it we 
should be able to get it!

Here is an edited portion ( I'm caught by a NDS of who I'm working for
right now ) of the message to demostrate the situation therefore the "..."
stuff.

---===+++***+++===---

From <[email protected]> Wed Jun 08 
01:17:10 2005
Received: from ... with ESMTP
  (SMTPD32-8.13) id A97F5DA0080; Wed, 08 Jun 2005 01:17:03 -0700
Received: from mta135.e.bordersstores.com (mta135.e.bordersstores.com 
[66.165.105.78])
	by ... id 2DA5020C011
	for <[email protected]>; Wed,  8 Jun 2005 01:16:57 -0700 (PDT)
Date: Wed, 8 Jun 2005 08:16:42 -0000
Message-ID: 
<bytm8yraxsb41rbfp1fe0b8gm574zx.343994725.9134@mta135.e.bordersstores.com>
List-Unsubscribe: 
<mailto:[email protected]>
From: "Borders" <[email protected]>

...

---===+++***+++===---


Rod
-- 
    "Open Source Software - You usually get more than you pay for..."
     "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"