<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># Copyrights 1995-2019 by [Mark Overmeer &lt;markov@cpan.org&gt;].
#  For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.02.
# This code is part of the bundle MailTools.  Meta-POD processed with
# OODoc into POD and HTML manual-pages.  See README.md for Copyright.
# Licensed under the same terms as Perl itself.

package Mail::Send;
use vars '$VERSION';
$VERSION = '2.21';


use strict;

use Mail::Mailer ();

sub Version { our $VERSION }

#------------------

sub new(@)
{   my ($class, %attr) = @_;
    my $self = bless {}, $class;

    while(my($key, $value) = each %attr)
    {	$key = lc $key;
        $self-&gt;$key($value);
    }

    $self;
}

#---------------

sub set($@)
{   my ($self, $hdr, @values) = @_;
    $self-&gt;{$hdr} = [ @values ] if @values;
    @{$self-&gt;{$hdr} || []};	# return new (or original) values
}


sub add($@)
{   my ($self, $hdr, @values) = @_;
    push @{$self-&gt;{$hdr}}, @values;
}


sub delete($)
{   my($self, $hdr) = @_;
    delete $self-&gt;{$hdr};
}


sub to		{ my $self=shift; $self-&gt;set('To', @_); }
sub cc		{ my $self=shift; $self-&gt;set('Cc', @_); }
sub bcc		{ my $self=shift; $self-&gt;set('Bcc', @_); }
sub subject	{ my $self=shift; $self-&gt;set('Subject', join (' ', @_)); }

#---------------

sub open(@)
{   my $self = shift;
    Mail::Mailer-&gt;new(@_)-&gt;open($self);
}

1;
</pre></body></html>