1=encoding utf8
2
3=head1 NAME
4
5Mail::Message::Convert::EmailSimple - translate Mail::Message to Email::Simple vv
6
7=head1 INHERITANCE
8
9 Mail::Message::Convert::EmailSimple
10   is a Mail::Message::Convert
11   is a Mail::Reporter
12
13=head1 SYNOPSIS
14
15 use Mail::Message::Convert::EmailSimple;
16 my $convert = Mail::Message::Convert::EmailSimple->new;
17
18 my Mail::Message $msg    = Mail::Message->new;
19 my Email::Simple $intern = $convert->export($msg);
20
21 my Email::Simple $intern = Mail::Internet->new;
22 my Mail::Message $msg    = $convert->from($intern);
23
24 use Mail::Box::Manager;
25 my $mgr     = Mail::Box::Manager->new;
26 my $folder  = $mgr->open(folder => 'Outbox');
27 $folder->addMessage($intern);
28
29=head1 DESCRIPTION
30
31The Email::Simple class is one of the base objects used by the
32large set of Email* modules, which implement many e-mail needs
33which are also supported by MailBox.  You can use this class to
34gradularly move from a Email* based implementation into a MailBox
35implementation.
36
37The internals of this class are far from optimal.  The conversion
38does work (thanks to Ricardo Signes), but is expensive in time
39and memory usage.  It could easily be optimized.
40
41Extends L<"DESCRIPTION" in Mail::Message::Convert|Mail::Message::Convert/"DESCRIPTION">.
42
43=head1 METHODS
44
45Extends L<"METHODS" in Mail::Message::Convert|Mail::Message::Convert/"METHODS">.
46
47=head2 Constructors
48
49Extends L<"Constructors" in Mail::Message::Convert|Mail::Message::Convert/"Constructors">.
50
51=over 4
52
53=item Mail::Message::Convert::EmailSimple-E<gt>B<new>(%options)
54
55Inherited, see L<Mail::Message::Convert/"METHODS">
56
57=back
58
59=head2 Converting
60
61Extends L<"Converting" in Mail::Message::Convert|Mail::Message::Convert/"Converting">.
62
63=over 4
64
65=item $obj-E<gt>B<export>($message, %options)
66
67Returns a new Email::Simple object based on the information from
68a L<Mail::Message|Mail::Message> object.  The $message specified is an
69instance of a Mail::Message.
70
71example:
72
73 my $convert = Mail::Message::Convert::EmailSimple->new;
74 my Mail::Message  $msg   = Mail::Message->new;
75 my Mail::Internet $copy  = $convert->export($msg);
76
77=item $obj-E<gt>B<from>($object, %options)
78
79Returns a new L<Mail::Message|Mail::Message> object based on the information from
80an Email::Simple.
81
82example:
83
84 my $convert = Mail::Message::Convert::EmailSimple->new;
85 my Mail::Internet $msg  = Mail::Internet->new;
86 my Mail::Message  $copy = $convert->from($msg);
87
88=item $obj-E<gt>B<selectedFields>($head)
89
90Inherited, see L<Mail::Message::Convert/"Converting">
91
92=back
93
94=head2 Error handling
95
96Extends L<"Error handling" in Mail::Message::Convert|Mail::Message::Convert/"Error handling">.
97
98=over 4
99
100=item $obj-E<gt>B<AUTOLOAD>()
101
102Inherited, see L<Mail::Reporter/"Error handling">
103
104=item $obj-E<gt>B<addReport>($object)
105
106Inherited, see L<Mail::Reporter/"Error handling">
107
108=item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
109
110=item Mail::Message::Convert::EmailSimple-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
111
112Inherited, see L<Mail::Reporter/"Error handling">
113
114=item $obj-E<gt>B<errors>()
115
116Inherited, see L<Mail::Reporter/"Error handling">
117
118=item $obj-E<gt>B<log>( [$level, [$strings]] )
119
120=item Mail::Message::Convert::EmailSimple-E<gt>B<log>( [$level, [$strings]] )
121
122Inherited, see L<Mail::Reporter/"Error handling">
123
124=item $obj-E<gt>B<logPriority>($level)
125
126=item Mail::Message::Convert::EmailSimple-E<gt>B<logPriority>($level)
127
128Inherited, see L<Mail::Reporter/"Error handling">
129
130=item $obj-E<gt>B<logSettings>()
131
132Inherited, see L<Mail::Reporter/"Error handling">
133
134=item $obj-E<gt>B<notImplemented>()
135
136Inherited, see L<Mail::Reporter/"Error handling">
137
138=item $obj-E<gt>B<report>( [$level] )
139
140Inherited, see L<Mail::Reporter/"Error handling">
141
142=item $obj-E<gt>B<reportAll>( [$level] )
143
144Inherited, see L<Mail::Reporter/"Error handling">
145
146=item $obj-E<gt>B<trace>( [$level] )
147
148Inherited, see L<Mail::Reporter/"Error handling">
149
150=item $obj-E<gt>B<warnings>()
151
152Inherited, see L<Mail::Reporter/"Error handling">
153
154=back
155
156=head2 Cleanup
157
158Extends L<"Cleanup" in Mail::Message::Convert|Mail::Message::Convert/"Cleanup">.
159
160=over 4
161
162=item $obj-E<gt>B<DESTROY>()
163
164Inherited, see L<Mail::Reporter/"Cleanup">
165
166=back
167
168=head1 DIAGNOSTICS
169
170=over 4
171
172=item Error: Package $package does not implement $method.
173
174Fatal error: the specific package (or one of its superclasses) does not
175implement this method where it should. This message means that some other
176related classes do implement this method however the class at hand does
177not.  Probably you should investigate this and probably inform the author
178of the package.
179
180=back
181
182=head1 SEE ALSO
183
184This module is part of Mail-Message distribution version 3.011,
185built on July 27, 2021. Website: F<http://perl.overmeer.net/CPAN/>
186
187=head1 LICENSE
188
189Copyrights 2001-2021 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.
190
191This program is free software; you can redistribute it and/or modify it
192under the same terms as Perl itself.
193See F<http://dev.perl.org/licenses/>
194
195