Email::Sender::Transport - a role for email transports


Email-Sender documentation Contained in the Email-Sender distribution.

Index


Code Index:

NAME

Top

Email::Sender::Transport - a role for email transports

VERSION

Top

version 0.110001

DESCRIPTION

Top

Email::Sender::Transport is a Moose role to aid in writing classes used to send mail. For the most part, its behavior comes entirely from the role Email::Sender::Role::CommonSending, which it includes. The important difference is that Transports are often intended to be used by Email::Sender::Simple, and they provide two methods related to that purpose.

First, they provide an allow_partial_success method which returns true or false to indicate whether the transport will ever signal partial success.

Second, they provide an is_simple method, which returns true if the transport is suitable for use with Email::Sender::Simple. By default, this method returns the inverse of allow_partial_success.

It is imperative that these methods be accurate to prevent Email::Sender::Simple users from sending partially successful transmissions. Partial success is a complex case that almost all users will wish to avoid at all times.

AUTHOR

Top

Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


Email-Sender documentation Contained in the Email-Sender distribution.

package Email::Sender::Transport;
BEGIN {
  $Email::Sender::Transport::VERSION = '0.110001';
}
use Moose::Role;
# ABSTRACT: a role for email transports


with 'Email::Sender::Role::CommonSending';

sub is_simple {
  my ($self) = @_;
  return if $self->allow_partial_success;
  return 1;
}

sub allow_partial_success { 0 }

no Moose::Role;
1;

__END__