Error checking
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@243 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
b2b7602d32
commit
8c32a22d27
@ -52,15 +52,17 @@ sub queue_handler {
|
|||||||
Port => $self->{_smtp_port},
|
Port => $self->{_smtp_port},
|
||||||
Timeout => 60,
|
Timeout => 60,
|
||||||
) || die $!;
|
) || die $!;
|
||||||
$smtp->mail( $transaction->sender->address || "" );
|
$smtp->mail( $transaction->sender->address || "" ) or return(DECLINED, "Unable to queue message ($!)");
|
||||||
$smtp->to($_->address) for $transaction->recipients;
|
for ($transaction->recipients) {
|
||||||
$smtp->data();
|
$smtp->to($_->address) or return(DECLINED, "Unable to queue message ($!)");
|
||||||
$smtp->datasend($transaction->header->as_string);
|
}
|
||||||
|
$smtp->data() or return(DECLINED, "Unable to queue message ($!)");
|
||||||
|
$smtp->datasend($transaction->header->as_string) or return(DECLINED, "Unable to queue message ($!)");
|
||||||
$transaction->body_resetpos;
|
$transaction->body_resetpos;
|
||||||
while (my $line = $transaction->body_getline) {
|
while (my $line = $transaction->body_getline) {
|
||||||
$smtp->datasend($line);
|
$smtp->datasend($line) or return(DECLINED, "Unable to queue message ($!)");
|
||||||
}
|
}
|
||||||
$smtp->dataend();
|
$smtp->dataend() or return(DECLINED, "Unable to queue message ($!)");
|
||||||
$smtp->quit() or return(DECLINED, "Unable to queue message ($!)");
|
$smtp->quit() or return(DECLINED, "Unable to queue message ($!)");
|
||||||
$self->log(LOGINFO, "finished queueing");
|
$self->log(LOGINFO, "finished queueing");
|
||||||
return (OK, "Queued!");
|
return (OK, "Queued!");
|
||||||
|
Loading…
Reference in New Issue
Block a user