Egg::View::Mail::Encode::ISO2022JP - Processing for Japanese mail is done.


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

Index


Code Index:

NAME

Top

Egg::View::Mail::Encode::ISO2022JP - Processing for Japanese mail is done.

SYNOPSIS

Top

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

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

  __PACKAGE__->setup_mailer( SMTP => qw/
    Encode::ISO2022JP
    MIME::Entity
    /);

DESCRIPTION

Top

Processing necessary to send Japanese mail is done.

Please use use with Egg::View::Mail::MIME::Entity. It is a code matched to the specification of this component.

SEE ALSO

Top

Egg::Release, Egg::View::Mail, Egg::View::Mail::Base, Egg::View::Mail::MIME::Entity, Jcode,

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::Encode::ISO2022JP;
#
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
#
# $Id: ISO2022JP.pm 285 2008-02-28 04:20:55Z lushe $
#
use strict;
use warnings;
use Jcode;

our $VERSION = '0.01';

sub __get_mailbody {
	my($self, $data)= @_;
	my $body= $self->next::method($data);
	my $j= $self->{jcode_context} ||= Jcode->new('jcode');
	$data->{subject}= $j->set(\$data->{subject})->mime_encode;
	my $headers= $data->{headers} ||= {};
	$headers->{Encoding}= '7bit';
	$headers->{Charset} = 'ISO-2022-JP';
	\$j->set($body)->iso_2022_jp;
}

1;

__END__