replaced return; with return undef;
This commit is contained in:
parent
ffa90c5fbd
commit
fa09c41598
113 changed files with 287 additions and 286 deletions
|
|
@ -77,11 +77,11 @@ sub connect {
|
|||
my $pop = Net::POP3->new($params->{server}, Timeout => 60);
|
||||
unless (defined $pop) {
|
||||
$session->errorHandler->error("Couldn't connect to POP3 server ". $params->{server});
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
unless ($pop->login($params->{account}, $params->{password})) {
|
||||
$session->errorHandler->error("Couldn't log in to POP3 server ".$params->{server}." as ".$params->{account});
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
my $messageNumbers = $pop->list;
|
||||
my @ids = ();
|
||||
|
|
@ -150,7 +150,7 @@ Retrieves the next available message from the server. Returns undef if there are
|
|||
sub getNextMessage {
|
||||
my $self = shift;
|
||||
my $id = pop(@{$self->{_ids}});
|
||||
return unless $id;
|
||||
return undef unless $id;
|
||||
my $rawMessage = $self->{_pop}->get($id);
|
||||
my $parser = MIME::Parser->new;
|
||||
$parser->output_to_core(1);
|
||||
|
|
@ -159,7 +159,7 @@ sub getNextMessage {
|
|||
$self->{_pop}->delete($id);
|
||||
} else {
|
||||
$self->session->errorHandler->error("Could not parse POP3 message $id");
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
my $head = $parsedMessage->head;
|
||||
my $type = $head->get("Content-Type");
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ sub addHtmlRaw {
|
|||
Type => "text/html",
|
||||
);
|
||||
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ sub addText {
|
|||
Data => wrap( '', '', $text ),
|
||||
);
|
||||
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -423,9 +423,9 @@ sub retrieve {
|
|||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $messageId = shift;
|
||||
return unless $messageId;
|
||||
return undef unless $messageId;
|
||||
my $data = $session->db->getRow("mailQueue","messageId", $messageId);
|
||||
return unless $data->{messageId};
|
||||
return undef unless $data->{messageId};
|
||||
$session->db->deleteRow("mailQueue","messageId", $messageId);
|
||||
my $parser = MIME::Parser->new;
|
||||
$parser->output_to_core(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue