Subject: | To address should not be mandatory |
The to address should not be necessary. it can be desirable to send an email with only bcc addresses.
diff -Naur Mail-Sender-0.8.10/Sender.pm new/Sender.pm
--- Mail-Sender-0.8.10/Sender.pm 2003-11-24 07:14:22.000000000 +1100
+++ new/Sender.pm 2005-07-20 12:01:06.000000000 +1000
@@ -379,12 +379,6 @@
return -7, $Mail::Sender::Error;
}
-sub TOEMPTY {
- $!=14;
- $Mail::Sender::Error="Argument \$to empty";
- return -8, $Mail::Sender::Error;
-}
-
sub NOMSG {
$!=22;
$Mail::Sender::Error="No message specified";
@@ -1075,8 +1069,6 @@
}
}
- if (!$self->{'to'}) { return $self->Error(TOEMPTY); }
-
return $self->Error(NOSERVER) unless defined $self->{'smtp'};
if (!defined($self->{'smtpaddr'})) { return $self->Error(HOSTNOTFOUND($self->{'smtp'})); }
@@ -1314,8 +1306,6 @@
}
}
- if (!$self->{'to'}) { return $self->Error(TOEMPTY); }
-
return $self->Error(NOSERVER) unless defined $self->{'smtp'};
if (!defined($self->{'smtpaddr'})) { return $self->Error(HOSTNOTFOUND($self->{'smtp'})); }