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       The MIME::Entity extends Mail::Internet message with multiparts and
31       more methods.  The Mail::Message objects are more flexible in how the
32       message parts are stored, and uses separate header and body objects.
33

METHODS

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

DIAGNOSTICS

147       Error: Converting from MIME::Entity but got a $type, return
148
149       Error: Package $package does not implement $method.
150
151       Fatal error: the specific package (or one of its superclasses) does not
152       implement this method where it should. This message means that some
153       other related classes do implement this method however the class at
154       hand does not.  Probably you should investigate this and probably
155       inform the author of the package.
156

SEE ALSO

158       This module is part of Mail-Box distribution version 2.070, built on
159       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
160

LICENSE

162       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
163       ChangeLog.
164
165       This program is free software; you can redistribute it and/or modify it
166       under the same terms as Perl itself.  See
167       http://www.perl.com/perl/misc/Artistic.html
168
169
170
171perl v5.8.8                       2007-03-M2a5il::Message::Convert::MimeEntity(3)
Impressum