diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm index 6fb0f49..ea1d41c 100644 --- a/lib/Qpsmtpd/Transaction.pm +++ b/lib/Qpsmtpd/Transaction.pm @@ -91,7 +91,7 @@ sub body_current_pos { sub body_filename { my $self = shift; $self->body_spool() unless $self->{_filename}; - $self->{_body_file}->close(); # so contents won't be cached + $self->{_body_file}->flush(); # so contents won't be cached return $self->{_filename}; }