Egg::View::Mail::Plugin::Signature - Famous etc. are added to the content of the transmission of mail.


Egg-Release-Mail documentation Contained in the Egg-Release-Mail distribution.

Index


Code Index:

NAME

Top

Egg::View::Mail::Plugin::Signature - Famous etc. are added to the content of the transmission of mail.

SYNOPSIS

Top

  package MyApp::View::Mail::MyComp;
  use base qw/ Egg::View::Mail::Base /;

  ...........
  .....

  __PACKAGE__->setup_plugin('Signature');

DESCRIPTION

Top

It is MAIL plugin to add famous etc. to the content when mail is transmitted.

When 'Signature' is passed to 'setup_plugin' method, it is built in.

There is a thing that processing the same as the aim is not done by the competition with other plugins. Please adjust the built-in order.

  __PACKAGE__->setup_plugin(qw/
    Signature
    EmbAgent
    /);

When the following items are set by the argument and the configuration of 'send' method, the content is added to the content of mail.

body_header

Text added to uppermost part of content of mail.

  $mail->send( ...... , body_header => $header_text );

signature

Text added the under content of mail.

  $mail->send( ...... , signature => $signature_text );

SEE ALSO

Top

Egg::Release, Egg::View::Mail, Egg::View::Mail::Base,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Release-Mail documentation Contained in the Egg-Release-Mail distribution.

package Egg::View::Mail::Plugin::Signature;
#
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
#
# $Id: Signature.pm 332 2008-04-19 17:03:10Z lushe $
#
use strict;
use warnings;

our $VERSION = '0.06';

sub __get_mailbody {
	my($self, $data)= @_;
	return $self->next::method($data) unless $data->{body};
	my $body= $data->{body}= $self->__init_mailbody($data);
	$$body = $data->{body_header}. $$body if $data->{body_header};
	$$body.= "\n$data->{body_footer}"     if $data->{body_footer};
	$$body.= "\n$data->{signature}"       if $data->{signature};
	$self->next::method($data);
}

1;

__END__