Re: ->get('From') vs. ->Sender vs. From:
Mark Overmeer <[email protected]> Thu, 9 Jun 2005 22:46:54 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Roderick A. Anderson ([email protected]) [050609 21:57]: > So is there anyway to get the message's F, r, o, m, space ( this > according to "man 5 mbox" using Mail::Box? Ah, you mean the message "separator" in mbox files. Easy: $msg->fromLine; When a message is moved into an mbox folder, this line is created, otherwise it is the one as read from the file. This separator line usually contains info you can also get from the Resent-lines in the header. my @rgs = $msg->head->resentGroups; print $rgs[0]->received if @rgs; print first { defined $_->from } @rgs; # Resent-From line > 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! Of course... but the Resent-Groups have a very limited set of fields in them. They all have their own get version, but no common 'get()' method. There is a common 'set()' which is especially usefull when a message is read. > 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. Have you seen Mail::Message::Head::ListGroup? my @lgs = $msg->head->listGroups; while(my $lg = shift @lgs) { print $lg->listname .':'. $lg->address; } -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net