| 1 | # Copyrights 1995-2024 by [Mark Overmeer <markov@cpan.org>]. | ||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.03. | ||||||||||||
| 5 | # This code is part of the bundle MailTools. Meta-POD processed with | ||||||||||||
| 6 | # OODoc into POD and HTML manual-pages. See README.md for Copyright. | ||||||||||||
| 7 | # Licensed under the same terms as Perl itself. | ||||||||||||
| 8 | |||||||||||||
| 9 | package Mail::Send;{ | ||||||||||||
| 10 | 2 | our $VERSION = '2.22'; | |||||||||||
| 11 | } | ||||||||||||
| 12 | |||||||||||||
| 13 | |||||||||||||
| 14 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | |||||||||||||
| 16 | 2 | ▶ | use Mail::Mailer (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 17 | |||||||||||||
| 18 | 0 | ▶ | sub Version { our $VERSION } | ||||||||||
|
Subroutine
Version: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 19 | |||||||||||||
| 20 | #------------------ | ||||||||||||
| 21 | |||||||||||||
| 22 | sub new(@) | ||||||||||||
| 23 | 2 | ▶ | { my ($class, %attr) = @_; | ||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 24 | 2 | my $self = bless {}, $class; | |||||||||||
| 25 | |||||||||||||
| 26 | 2 | ▶ | while(my($key, $value) = each %attr) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 27 | 2 | { $key = lc $key; | |||||||||||
| 28 | 2 | $self->$key($value); | |||||||||||
| 29 | } | ||||||||||||
| 30 | |||||||||||||
| 31 | 2 | $self; | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | #--------------- | ||||||||||||
| 35 | |||||||||||||
| 36 | sub set($@) | ||||||||||||
| 37 | 10 | ▶ | { my ($self, $hdr, @values) = @_; | ||||||||||
|
Subroutine
set: called CC=3 SCAR=11.4
Pod
documented
| |||||||||||||
| 38 | 10 | ▶ | $self->{$hdr} = [ @values ] if @values; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 39 | 10 | ▶ | @{$self->{$hdr} || []}; # return new (or original) values | ||||||||||
|
Condition50%1/2
$self->{$hdr} || []
MC/DC0%0/1
$self->{$hdr} || []
$self->{$hdr}
Truth table50%1/2
A
A= $self->{$hdr}
| |||||||||||||
| 40 | } | ||||||||||||
| 41 | |||||||||||||
| 42 | |||||||||||||
| 43 | sub add($@) | ||||||||||||
| 44 | 1 | ▶ | { my ($self, $hdr, @values) = @_; | ||||||||||
|
Subroutine
add: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 45 | 1 | push @{$self->{$hdr}}, @values; | |||||||||||
| 46 | } | ||||||||||||
| 47 | |||||||||||||
| 48 | |||||||||||||
| 49 | sub delete($) | ||||||||||||
| 50 | 1 | ▶ | { my($self, $hdr) = @_; | ||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 51 | 1 | delete $self->{$hdr}; | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | |||||||||||||
| 55 | 2 | ▶ | sub to { my $self=shift; $self->set('To', @_); } | ||||||||||
|
Subroutine
to: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 56 | 1 | ▶ | sub cc { my $self=shift; $self->set('Cc', @_); } | ||||||||||
|
Subroutine
cc: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 57 | 2 | ▶ | sub bcc { my $self=shift; $self->set('Bcc', @_); } | ||||||||||
|
Subroutine
bcc: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 58 | 2 | ▶ | sub subject { my $self=shift; $self->set('Subject', join (' ', @_)); } | ||||||||||
|
Subroutine
subject: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 59 | |||||||||||||
| 60 | #--------------- | ||||||||||||
| 61 | |||||||||||||
| 62 | sub open(@) | ||||||||||||
| 63 | 0 | ▶ | { my $self = shift; | ||||||||||
|
Subroutine
open: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 64 | 0 | Mail::Mailer->new(@_)->open($self); | |||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | 2 | 1; | |||||||||||