.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Mail::Message::Convert 3" .TH Mail::Message::Convert 3 2026-04-11 "perl v5.42.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::Message::Convert \- conversions between message types .SH INHERITANCE .IX Header "INHERITANCE" .Vb 2 \& Mail::Message::Convert \& is a Mail::Reporter \& \& Mail::Message::Convert is extended by \& Mail::Message::Convert::EmailSimple \& Mail::Message::Convert::Html \& Mail::Message::Convert::HtmlFormatPS \& Mail::Message::Convert::HtmlFormatText \& Mail::Message::Convert::MailInternet \& Mail::Message::Convert::MimeEntity \& Mail::Message::Convert::TextAutoformat .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" Available methods are very converter\-specific. .SH DESCRIPTION .IX Header "DESCRIPTION" This class is the base for various message (and message parts) converters. .PP Extends "DESCRIPTION" in Mail::Reporter. .SS "Converters between message objects" .IX Subsection "Converters between message objects" Internally, the \fBMail::Message::coerce()\fR is called when foreign objects are used where message objects are expected. That method will automatically create the converting objects, and re\-use them. .IP \(bu 4 Mail::Message::Convert::MailInternet .Sp Converts the simple Mail::Internet messages into Mail::Message objects. .IP \(bu 4 Mail::Message::Convert::MimeEntity .Sp Converts the more complicated MIME::Entity messages into Mail::Message objects. .IP \(bu 4 Mail::Message::Convert::EmailSimple .Sp Converts Email::Simple messages into Mail::Message objects. .SS "Other converters" .IX Subsection "Other converters" .IP \(bu 4 Mail::Message::Convert::Html .Sp Plays tricks with HTML/XMHTML without help of external modules. .IP \(bu 4 Mail::Message::Convert::HtmlFormatText .Sp Converts HTML body objects to plain text objects using the HTML::FormatText module. .IP \(bu 4 Mail::Message::Convert::HtmlFormatPS .Sp Converts HTML body objects to Postscript objects using the HTML::FormatPS module. .IP \(bu 4 Mail::Message::Convert::TextAutoformat .Sp Converts a text message into text using Text::Autoformat. .SH METHODS .IX Header "METHODS" Extends "METHODS" in Mail::Reporter. .SS Constructors .IX Subsection "Constructors" Extends "Constructors" in Mail::Reporter. .ie n .IP $class\->\fBnew\fR(%options) 4 .el .IP \f(CW$class\fR\->\fBnew\fR(%options) 4 .IX Item "$class->new(%options)" Inherited, see "Constructors" in Mail::Reporter .Sp .Vb 2 \& \-Option\-\-Default \& fields .Ve .RS 4 .ie n .IP "fields => $name|$regex|\e@names|\e@regexes" 2 .el .IP "fields => \f(CW$name\fR|$regex|\e@names|\e@regexes" 2 .IX Item "fields => $name|$regex|@names|@regexes" Select the fields of a header which are to be handled. Other fields will not be used. The value of this option is passed to \&\fBMail::Message::Head::Complete::grepNames()\fR whenever converters feel a need for header line selection. By default, the \f(CW\*(C`To\*(C'\fR, \f(CW\*(C`From\*(C'\fR, \f(CW\*(C`Cc\*(C'\fR, \f(CW\*(C`Bcc\*(C'\fR, \f(CW\*(C`Date\*(C'\fR, \f(CW\*(C`Subject\*(C'\fR, and their \&\f(CW\*(C`Resent\-\*(C'\fR counterparts will be selected. Specify an empty list to get all fields. .RE .RS 4 .RE .SS Attributes .IX Subsection "Attributes" Extends "Attributes" in Mail::Reporter. .SS Converting .IX Subsection "Converting" .ie n .IP $obj\->\fBselectedFields\fR($head) 4 .el .IP \f(CW$obj\fR\->\fBselectedFields\fR($head) 4 .IX Item "$obj->selectedFields($head)" Returns a list of fields to be included in the format. The list is an ordered selection of the fields in the actual header, and filtered through the information as specified with new(fields). .SS "Error handling" .IX Subsection "Error handling" Extends "Error handling" in Mail::Reporter. .ie n .IP $obj\->\fBAUTOLOAD\fR() 4 .el .IP \f(CW$obj\fR\->\fBAUTOLOAD\fR() 4 .IX Item "$obj->AUTOLOAD()" Inherited, see "Error handling" in Mail::Reporter .ie n .IP $obj\->\fBnotImplemented\fR() 4 .el .IP \f(CW$obj\fR\->\fBnotImplemented\fR() 4 .IX Item "$obj->notImplemented()" Inherited, see "Error handling" in Mail::Reporter .SS Cleanup .IX Subsection "Cleanup" Extends "Cleanup" in Mail::Reporter. .ie n .IP $obj\->\fBDESTROY\fR() 4 .el .IP \f(CW$obj\fR\->\fBDESTROY\fR() 4 .IX Item "$obj->DESTROY()" Inherited, see "Cleanup" in Mail::Reporter .SH DIAGNOSTICS .IX Header "DIAGNOSTICS" .ie n .IP "Error: class $package does not implement method $method." 4 .el .IP "Error: class \f(CW$package\fR does not implement method \f(CW$method\fR." 4 .IX Item "Error: class $package does not implement method $method." Fatal error: the specific \f(CW$package\fR (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast by \f(CWnotImplemented()\fR .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Mail\-Message version 4.05, built on April 10, 2026. Website: \fIhttp://perl.overmeer.net/mailbox/\fR .SH LICENSE .IX Header "LICENSE" For contributors see file ChangeLog. .PP This software is copyright (c) 2001\-2026 by Mark Overmeer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.