Regex FTW!
[kivitendo-erp.git] / SL / Mailer.pm
index 5e28012..02b1173 100644 (file)
@@ -36,6 +36,8 @@ use SL::Common;
 use SL::MIME;
 use SL::Template;
 
+use strict;
+
 my $num_sent = 0;
 
 sub new {
@@ -184,7 +186,7 @@ $self->{message}
 
       my $application    = ($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/) ? "text" : "application";
       my $content_type   = SL::MIME->mime_type_from_ext($filename);
-      $content_type      = "${application}/${self->{format}}" if (!$content_type && $self->{format});
+      $content_type      = "${application}/$self->{format}" if (!$content_type && $self->{format});
       $content_type    ||= 'application/octet-stream';
 
       open(IN, $attachment);