Merge pull request #37 from tpoindessous/patch-1

Add the message id in log
This commit is contained in:
Matt Simerson 2014-01-24 09:28:07 -08:00
commit 941fac98ae

View File

@ -73,7 +73,11 @@ sub hook_queue {
or return (DECLINED, "Unable to queue message ($!)"); or return (DECLINED, "Unable to queue message ($!)");
} }
$smtp->dataend() or return (DECLINED, "Unable to queue message ($!)"); $smtp->dataend() or return (DECLINED, "Unable to queue message ($!)");
my $qid = $smtp->message();
my @list = split(' ', $qid);
$qid = pop(@list);
$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 as $qid");
} }