Better bounce logging

This commit is contained in:
Martin Kamerbeek 2010-05-20 15:22:23 +02:00
parent b7b1811387
commit 55934b11f5
2 changed files with 37 additions and 43 deletions

View file

@ -46,6 +46,9 @@ sub crud_definition {
sentTo => {
fieldType => 'text',
},
bounceReason => {
fieldType => 'text',
},
);
$definition->{ properties } = {
@ -202,11 +205,14 @@ sub user {
}
sub registerBounced {
my $self = shift;
my $self = shift;
my $reason = shift;
my $message = shift;
$self->update( {
status => 'error',
errorMessage => 'Message was bounced',
status => 'bounced',
errorMessage => $message,
bounceReason => $reason,
} );
#### TODO: Write to bounce log