Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mail-Sender CPAN distribution.

Report information
The Basics
Id: 13788
Status: resolved
Priority: 0/
Queue: Mail-Sender

People
Owner: JENDA [...] cpan.org
Requestors: david_dick [...] iprimus.com.au
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.8.10
Fixed in: (no value)



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'})); }
That's what the fake_to=> option is for.