Mail-Message
view release on metacpan or search on metacpan
lib/Mail/Message/Convert/Html.pm view on Meta::CPAN
sub init($)
{ my ($self, $args) = @_;
$self->SUPER::init($args);
my $produce = $args->{produce} || 'HTML';
$self->{MMCH_tail}
= $produce eq 'HTML' ? '>'
: $produce eq 'XHTML' ? ' />'
: error __x"produce XHTML or HTML, not {what UNKNOWN}.", what => $produce;
$self;
}
#--------------------
sub textToHtml(@)
{ my $self = shift;
my @lines = @_; # copy is required
lib/Mail/Message/Convert/Html.pod view on Meta::CPAN
=over 2
=item fields => $name|$regex|\@names|\@regexes
=item head_mailto => BOOLEAN
Whether to replace e-mail addresses in some header lines with links.
=item produce => 'HTML'|'XHTML'
Produce HTML or XHTML output. The output is slightly different, even
html browsers will usually accept the XHTML data.
=back
=back
=head2 Attributes
Extends L<"Attributes" in Mail::Message::Convert|Mail::Message::Convert/"Attributes">.
=head2 Converting
lib/Mail/Message/Convert/Html.pod view on Meta::CPAN
=item Error: class $package does not implement method $method.
Fatal error: the specific C<$package> (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 C<notImplemented()>
=item Error: produce XHTML or HTML, not $what.
Cast by C<new()>
=back
=head1 SEE ALSO
This module is part of Mail-Message version 4.01,
built on December 13, 2025. Website: F<http://perl.overmeer.net/CPAN/>
lib/Mail/Message/Convert/HtmlFormatPS.pod view on Meta::CPAN
=head1 SYNOPSIS
use Mail::Message::Convert::HtmlFormatPS;
my $af = Mail::Message::Convert::HtmlFormatPS->new;
my $postscript = $af->format($body);
=head1 DESCRIPTION
Translate an HTML/XHTML message body into a postscript body
using HTML::FormatPS.
Extends L<"DESCRIPTION" in Mail::Message::Convert|Mail::Message::Convert/"DESCRIPTION">.
=head1 METHODS
Extends L<"METHODS" in Mail::Message::Convert|Mail::Message::Convert/"METHODS">.
=head2 Constructors
lib/Mail/Message/Convert/HtmlFormatText.pod view on Meta::CPAN
=head1 SYNOPSIS
use Mail::Message::Convert::HtmlFormatText;
my $af = Mail::Message::Convert::HtmlFormatText->new;
my $plain_body = $af->format($body);
=head1 DESCRIPTION
Convert HTML/XHTML message body objects into plain text bodies using
HTML::FormatText. This package requires HTML::TreeBuilder and
HTML::FormatText which are not installed by default together with
L<Mail::Box|Mail::Box>. See also L<Mail::Message::rebuild()|Mail::Message::Construct::Rebuild/"Constructing a message"> with rule
C<text_alternative_for_html>.
This module is a small wrapper around HTML::FormatText.
Extends L<"DESCRIPTION" in Mail::Message::Convert|Mail::Message::Convert/"DESCRIPTION">.
=head1 METHODS
t/321bodyconv-html.t view on Meta::CPAN
#!/usr/bin/env perl
#
# Test conversions as HTML/XHTML without help of external modules
#
use strict;
use warnings;
use Mail::Message;
use Mail::Message::Test;
use Mail::Message::Head::Complete;
use Mail::Message::Field::Fast;
use Mail::Message::Convert::Html;
t/322bodyconv-htmlps.t view on Meta::CPAN
#!/usr/bin/env perl
#
# Test conversions from HTML/XHTML to postscript with HTML::FormatPS
#
use strict;
use warnings;
use Mail::Message::Test;
use Mail::Message::Body::Lines;
use Test::More;
t/323bodyconv-htmltxt.t view on Meta::CPAN
#!/usr/bin/env perl
#
# Test conversions from HTML/XHTML to plain text with HTML::FormatText
#
use strict;
use warnings;
use Mail::Message::Test;
use Mail::Message::Body::Lines;
use Test::More;
( run in 0.646 second using v1.01-cache-2.11-cpan-30a0b3e4e11 )