GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MAIL::MESSAGE::CONSTRUCT::TEXT (3)

.ds Aq ’

NAME

Mail::Message::Construct::Text - capture a Mail::Message as text

CONTENTS

SYNOPSIS



 my $text = $msg->string;
 my $text = "$msg";   # via overload

 my @text = $msg->lines;
 my @text = @$lines;  # via overload

 my $fh   = $msg->file;
 my $line = <$fh>;

 $msg->printStructure;



DESCRIPTION

Complex functionality on Mail::Message objects is implemented in different files which are autoloaded. This file implements the functionality related to creating message replies.

METHODS

    The whole message as text

$obj-><B>fileB>() Returns the message as file-handle.
$obj-><B>linesB>() Returns the whole message as set of lines. In LIST context, copies of the lines are returned. In SCALAR context, a reference to an array of lines is returned.
$obj-><B>printStructureB>([FILEHANDLE|undef],[INDENT]) Print the structure of a message to the specified FILEHANDLE or the selected filehandle. When explicitly undef is specified as handle, then the output will be returned as string.

The message’s subject and the types of all composing parts are displayed.

INDENT specifies the initial indentation string: it is added in front of each line. The INDENT must contain at least one white-space.

example:



 my $msg = ...;
 $msg->printStructure(\*OUTPUT);

 $msg->printStructure;

 my $struct = $msg->printStructure(undef);

 # Possible output for one message:
 multipart/mixed: forwarded message from Pietje Puk (1550 bytes)
    text/plain (164 bytes)
    message/rfc822 (1043 bytes)
       multipart/alternative: A multipart alternative (942 bytes)
          text/plain (148 bytes, deleted)
          text/html (358 bytes)



$obj-><B>stringB>() Returns the whole message as string.

    Flags

SEE ALSO

This module is part of Mail-Box distribution version 2.109, built on August 19, 2013. Website: http://perl.overmeer.net/mailbox/

LICENSE

Copyrights 2001-2013 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MAIL::MESSAGE::CONSTRUCT::TEXT (3) 2013-08-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.