1Mail::Message::Convert:U:sMeirmeCEonnttirtiyb(u3t)ed PerMlaiDlo:c:uMmeesnstaagtei:o:nConvert::MimeEntity(3)
2
3
4
6 Mail::Message::Convert::MimeEntity - translate Mail::Message to
7 MIME::Entity vv
8
10 Mail::Message::Convert::MimeEntity
11 is a Mail::Message::Convert
12 is a Mail::Reporter
13
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
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
34 Extends "DESCRIPTION" in Mail::Message::Convert.
35
37 Extends "METHODS" in Mail::Message::Convert.
38
39 Constructors
40 Extends "Constructors" in Mail::Message::Convert.
41
42 Mail::Message::Convert::MimeEntity->new(%options)
43 Inherited, see "METHODS" in Mail::Message::Convert
44
45 Converting
46 Extends "Converting" in Mail::Message::Convert.
47
48 $obj->export( $message, [$parser] )
49 Returns a new MIME::Entity message object based on the information
50 from the $message, which is a Mail::Message object.
51
52 You may want to supply your own $parser, which is a MIME::Parser
53 object, to change the parser flags. Without a $parser object, one
54 is created for you, with all the default settings.
55
56 If "undef" is passed, in place of a $message, then an empty list is
57 returned. When the parsing failes, then MIME::Parser throws an
58 exception.
59
60 example:
61
62 my $convert = Mail::Message::Convert::MimeEntity->new;
63 my Mail::Message $msg = Mail::Message->new;
64 my manual MIME::Entity $copy = $convert->export($msg);
65
66 $obj->from($mime_object)
67 Returns a new Mail::Message object based on the information from
68 the specified MIME::Entity. If the conversion fails, the "undef"
69 is returned. If "undef" is passed in place of an OBJECT, then an
70 empty list is returned.
71
72 example:
73
74 my $convert = Mail::Message::Convert::MimeEntity->new;
75 my MIME::Entity $msg = MIME::Entity->new;
76 my Mail::Message $copy = $convert->from($msg);
77
78 $obj->selectedFields($head)
79 Inherited, see "Converting" in Mail::Message::Convert
80
81 Error handling
82 Extends "Error handling" in Mail::Message::Convert.
83
84 $obj->AUTOLOAD()
85 Inherited, see "Error handling" in Mail::Reporter
86
87 $obj->addReport($object)
88 Inherited, see "Error handling" in Mail::Reporter
89
90 $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
91 $callback] )
92 Mail::Message::Convert::MimeEntity->defaultTrace( [$level]|[$loglevel,
93 $tracelevel]|[$level, $callback] )
94 Inherited, see "Error handling" in Mail::Reporter
95
96 $obj->errors()
97 Inherited, see "Error handling" in Mail::Reporter
98
99 $obj->log( [$level, [$strings]] )
100 Mail::Message::Convert::MimeEntity->log( [$level, [$strings]] )
101 Inherited, see "Error handling" in Mail::Reporter
102
103 $obj->logPriority($level)
104 Mail::Message::Convert::MimeEntity->logPriority($level)
105 Inherited, see "Error handling" in Mail::Reporter
106
107 $obj->logSettings()
108 Inherited, see "Error handling" in Mail::Reporter
109
110 $obj->notImplemented()
111 Inherited, see "Error handling" in Mail::Reporter
112
113 $obj->report( [$level] )
114 Inherited, see "Error handling" in Mail::Reporter
115
116 $obj->reportAll( [$level] )
117 Inherited, see "Error handling" in Mail::Reporter
118
119 $obj->trace( [$level] )
120 Inherited, see "Error handling" in Mail::Reporter
121
122 $obj->warnings()
123 Inherited, see "Error handling" in Mail::Reporter
124
125 Cleanup
126 Extends "Cleanup" in Mail::Message::Convert.
127
128 $obj->DESTROY()
129 Inherited, see "Cleanup" in Mail::Reporter
130
132 Error: Converting from MIME::Entity but got a $type, return
133 Error: Package $package does not implement $method.
134 Fatal error: the specific package (or one of its superclasses) does
135 not implement this method where it should. This message means that
136 some other related classes do implement this method however the
137 class at hand does not. Probably you should investigate this and
138 probably inform the author of the package.
139
141 This module is part of Mail-Message distribution version 3.007, built
142 on September 03, 2018. Website: http://perl.overmeer.net/CPAN/
143
145 Copyrights 2001-2018 by [Mark Overmeer <markov@cpan.org>]. For other
146 contributors see ChangeLog.
147
148 This program is free software; you can redistribute it and/or modify it
149 under the same terms as Perl itself. See http://dev.perl.org/licenses/
150
151
152
153perl v5.28.0 2018-09-M0a3il::Message::Convert::MimeEntity(3)