summaryrefslogtreecommitdiff
path: root/lib/JWebmail/Model/WriteMails.pm
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2021-08-24 11:10:39 +0200
committerJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2021-08-24 11:10:39 +0200
commit2388747fbf954de990862a6c01713d50823e8725 (patch)
treec3b3a7dc80f1d6a978d25e3048f7a6afb9fa08e0 /lib/JWebmail/Model/WriteMails.pm
parentbf5554febae6f299c716b5a9582c6bfd6980b728 (diff)
overhauled testing
Diffstat (limited to 'lib/JWebmail/Model/WriteMails.pm')
-rw-r--r--lib/JWebmail/Model/WriteMails.pm5
1 files changed, 2 insertions, 3 deletions
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};