Route all emails through the mailQueue to prevent dropped emails.

This commit is contained in:
Colin Kuskie 2010-02-24 09:58:07 -08:00
parent f761188bb0
commit a21783304e
4 changed files with 7 additions and 6 deletions

View file

@ -194,7 +194,7 @@ sub execute {
from=>$cs->get("mailAddress")
});
$send->addText($i18n->get("rejected because no user account"));
$send->send;
$send->queue;
}
next;
}
@ -232,7 +232,7 @@ sub execute {
from=>$cs->get("mailAddress")
});
$send->addText($i18n->get("rejected because not allowed"));
$send->send;
$send->queue;
}
# just in case there are a lot of messages, we should release after a minutes worth of retrieving
last if (time() > $start + $ttl);

View file

@ -107,7 +107,8 @@ sub execute {
$mail->addText($message);
$mail->addFooter;
$self->session->user({user=>$previousUser});
return $mail->send ? $self->COMPLETE : $self->ERROR;
return $mail->queue;
return $self->COMPLETE;
}

View file

@ -120,7 +120,7 @@ sub _notify {
my $html = sprintf $i18n->get('email message'), $dataHashRef->{count}, $s, $hostname, $hostname;
$mail->addHtml($html);
$mail->send();
$mail->queue();
}
1;