1Mail::Message::Convert:U:sMeirmeCEonnttirtiyb(u3t)ed PerMlaiDlo:c:uMmeesnstaagtei:o:nConvert::MimeEntity(3)
2
3
4

NAME

6       Mail::Message::Convert::MimeEntity - translate Mail::Message to
7       MIME::Entity vv
8

INHERITANCE

10        Mail::Message::Convert::MimeEntity
11          is a Mail::Message::Convert
12          is a Mail::Reporter
13

SYNOPSIS

15        use Mail::Message::Convert::MimeEntity;
16        my $convert = Mail::Message::Convert::MimeEntity->new;
17
18        my Mail::Message $msg    = Mail::Message->new;
19        my MIME::Entity  $entity = $convert->export($msg);
20
21        my MIME::Entity  $entity = MIME::Entity->new;
22        my Mail::Message $msg    = $convert->from($entity);
23
24        use Mail::Box::Manager;
25        my $mgr     = Mail::Box::Manager->new;
26        my $folder  = $mgr->open(folder => 'Outbox');
27        $folder->addMessage($entity);
28

DESCRIPTION

30   Converters between message objects
31   Other converters
32       The MIME::Entity extends Mail::Internet message with multiparts and
33       more methods.  The Mail::Message objects are more flexible in how the
34       message parts are stored, and uses separate header and body objects.
35

METHODS

37   Constructors
38       Mail::Message::Convert::MimeEntity->new(OPTIONS)
39           See "METHODS" in Mail::Message::Convert
40
41   Converting
42       $obj->export(MESSAGE, [PARSER])
43           Returns a new MIME::Entity message object based on the information
44           from the MESSAGE, which is a Mail::Message object.
45
46           You may want to supply your own PARSER, which is a MIME::Parser
47           object, to change the parser flags.  Without a PARSER object, one
48           is created for you, with all the default settings.
49
50           If "undef" is passed, in place of a MESSAGE, then an empty list is
51           returned.  When the parsing failes, then MIME::Parser throws an
52           exception.
53
54           example:
55
56            my $convert = Mail::Message::Convert::MimeEntity->new;
57            my Mail::Message $msg  = Mail::Message->new;
58            my manual MIME::Entity  $copy = $convert->export($msg);
59
60       $obj->from(MIME-OBJECT)
61           Returns a new Mail::Message object based on the information from
62           the specified MIME::Entity.  If the conversion fails, the "undef"
63           is returned.  If "undef" is passed in place of an OBJECT, then an
64           empty list is returned.
65
66           example:
67
68            my $convert = Mail::Message::Convert::MimeEntity->new;
69            my MIME::Entity  $msg  = MIME::Entity->new;
70            my Mail::Message $copy = $convert->from($msg);
71
72       $obj->selectedFields(HEAD)
73           See "Converting" in Mail::Message::Convert
74
75   Error handling
76       $obj->AUTOLOAD
77           See "Error handling" in Mail::Reporter
78
79       $obj->addReport(OBJECT)
80           See "Error handling" in Mail::Reporter
81
82       $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
83           Mail::Message::Convert::MimeEntity->defaultTrace([LEVEL]|[LOGLEVEL,
84           TRACELEVEL]|[LEVEL, CALLBACK])
85
86           See "Error handling" in Mail::Reporter
87
88       $obj->errors
89           See "Error handling" in Mail::Reporter
90
91       $obj->log([LEVEL [,STRINGS]])
92           Mail::Message::Convert::MimeEntity->log([LEVEL [,STRINGS]])
93
94           See "Error handling" in Mail::Reporter
95
96       $obj->logPriority(LEVEL)
97           Mail::Message::Convert::MimeEntity->logPriority(LEVEL)
98
99           See "Error handling" in Mail::Reporter
100
101       $obj->logSettings
102           See "Error handling" in Mail::Reporter
103
104       $obj->notImplemented
105           See "Error handling" in Mail::Reporter
106
107       $obj->report([LEVEL])
108           See "Error handling" in Mail::Reporter
109
110       $obj->reportAll([LEVEL])
111           See "Error handling" in Mail::Reporter
112
113       $obj->trace([LEVEL])
114           See "Error handling" in Mail::Reporter
115
116       $obj->warnings
117           See "Error handling" in Mail::Reporter
118
119   Cleanup
120       $obj->DESTROY
121           See "Cleanup" in Mail::Reporter
122
123       $obj->inGlobalDestruction
124           See "Cleanup" in Mail::Reporter
125

DIAGNOSTICS

127       Error: Converting from MIME::Entity but got a $type, return
128       Error: Package $package does not implement $method.
129           Fatal error: the specific package (or one of its superclasses) does
130           not implement this method where it should. This message means that
131           some other related classes do implement this method however the
132           class at hand does not.  Probably you should investigate this and
133           probably inform the author of the package.
134

SEE ALSO

136       This module is part of Mail-Box distribution version 2.097, built on
137       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
138

LICENSE

140       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
141       ChangeLog.
142
143       This program is free software; you can redistribute it and/or modify it
144       under the same terms as Perl itself.  See
145       http://www.perl.com/perl/misc/Artistic.html
146
147
148
149perl v5.12.3                      2011-01-M2a6il::Message::Convert::MimeEntity(3)
Impressum