From 2388747fbf954de990862a6c01713d50823e8725 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 24 Aug 2021 11:10:39 +0200 Subject: overhauled testing --- lib/JWebmail/Model/WriteMails.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/JWebmail/Model/WriteMails.pm') diff --git a/lib/JWebmail/Model/WriteMails.pm b/lib/JWebmail/Model/WriteMails.pm index 1807a72..aa2f1d4 100644 --- a/lib/JWebmail/Model/WriteMails.pm +++ b/lib/JWebmail/Model/WriteMails.pm @@ -24,8 +24,7 @@ sub _build_mail { }, body_str => $mail->{message}, ); - my $attach; - $attach = Email::MIME->create( + my $attach = Email::MIME->create( attributes => { content_type => $mail->{attach_type}, encoding => 'base64', @@ -40,7 +39,7 @@ sub _build_mail { Subject => $mail->{subject}, 'X-Mailer' => 'JWebmail', ], - parts => [$text_part, $attach || () ], + parts => [ $text_part, $attach // () ], ); $email->header_str_set(CC => @{$mail->{cc}}) if $mail->{cc}; $email->header_str_set('Reply-To' => $mail->{reply}) if $mail->{reply}; -- cgit v1.2.3