=encoding utf-8

=head1 NAME

Log::Dispatch::Email::EmailSender - Subclass of Log::Dispatch::Email that uses the Email::Sender::Simple module

=head1 SYNOPSIS

  ###
  ### simple usage
  ###
  use Log::Dispatch;
  my $log =
      Log::Dispatch->new
          ( outputs =>
                [ [ 'Email::EmailSender',
                    min_level     => 'emerg',
                    from          => 'logger@example.com',
                    to            => [ qw( foo@example.com bar@example.org ) ],
                    subject       => 'Big error!',
                    header_encode => 'MIME-Header-ISO_2022_JP',
                    body_encode   => 'iso-2022-jp' ]
                ],
          );
  $log->emerg("Something bad is happening");

  ###
  ### Sending a message with Email::Sender::Transport::SMTP
  ### Does not support ssl option.
  ###
  use Log::Dispatch;
  my $log =
      Log::Dispatch->new
          ( outputs =>
                [ [ 'Email::EmailSender',
                    min_level     => 'emerg',
                    from          => 'logger@example.com',
                    to            => [ qw( foo@example.com bar@example.org ) ],
                    subject       => 'Big error!',
                    header_encode => 'MIME-Header-ISO_2022_JP',
                    body_encode   => 'iso-2022-jp',
                    use_transport => 1,
                    host          => [your smtp host],
                    port          => [your smtp port number] ]
                ],
          );
  $log->emerg("Something bad is happening");

=head1 DESCRIPTION

This is a subclass of L<Log::Dispatch::Email> that implements the
send_email method using the L<Email::Sender::Simple> module.

=head1 DESCRIPTION(ja)

デフォルトで日本語の件名と本文を ISO_2022_JP にエンコーディングしてくれます。
他のモジュールのように文字化けが起こりません。

=head1 DEPENDENCIES

=over

=item L<Log::Dispatch::Email>

=item L<Encode>

=item L<Email::MIME>

=item L<Email::Sender::Simple>

=item L<Email::Sender::Transport::SMTP>

=back


=head1 BUGS AND LIMITATIONS

Does not support SSL on Email::Sender::Transport::SMTP.

I don't understand why it doesn't work.

=head1 AUTHOR

keroyon E<lt>keroyon@cpan.orgE<gt>

=head1 SEE ALSO

Log::Dispatch
Log::Dispatch::Email::MailSender

=head1 LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.


=cut

