Email-Abstract
view release on metacpan or search on metacpan
lib/Email/Abstract.pm view on Meta::CPAN
message more complicated than a single-part seven-bit plain-text message, you
are likely to break something. If you need to do this sort of thing, you
should probably use a specific message class from end to end.
This method is left in place for backwards compatibility.
=head2 as_string
my $string = $email->as_string;
This returns the whole email as a decoded string.
=head2 cast
my $mime_entity = $email->cast('MIME::Entity');
This method will convert a message from one message class to another. It will
throw an exception if no adapter for the target class is known, or if the
adapter does not provide a C<construct> method.
=head2 object
lib/Email/Abstract.pm view on Meta::CPAN
#pod message more complicated than a single-part seven-bit plain-text message, you
#pod are likely to break something. If you need to do this sort of thing, you
#pod should probably use a specific message class from end to end.
#pod
#pod This method is left in place for backwards compatibility.
#pod
#pod =head2 as_string
#pod
#pod my $string = $email->as_string;
#pod
#pod This returns the whole email as a decoded string.
#pod
#pod =head2 cast
#pod
#pod my $mime_entity = $email->cast('MIME::Entity');
#pod
#pod This method will convert a message from one message class to another. It will
#pod throw an exception if no adapter for the target class is known, or if the
#pod adapter does not provide a C<construct> method.
#pod
#pod =head2 object
lib/Email/Abstract/MailMessage.pm view on Meta::CPAN
Mail::Message->read($rfc822);
}
sub get_header {
my ($class, $obj, $header) = @_;
$obj->head->get($header);
}
sub get_body {
my ($class, $obj) = @_;
$obj->decoded->string;
}
sub set_header {
my ($class, $obj, $header, @data) = @_;
$obj->head->delete($header);
$obj->head->add($header, $_) for @data;
}
sub set_body {
my ($class, $obj, $body) = @_;
( run in 0.299 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )