SL::Mailer: content_type statt contenttype, so wie im POD beschrieben
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 13 Jul 2018 13:38:24 +0000 (15:38 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 13 Jul 2018 13:47:15 +0000 (15:47 +0200)
SL/Form.pm
SL/Mailer.pm

index b983588..0ecb221 100644 (file)
@@ -1110,7 +1110,7 @@ sub send_email {
   my @attfiles;
   # if we send html or plain text inline
   if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) {
-    $mail->{contenttype}    =  "text/html";
+    $mail->{content_type}   =  "text/html";
     $mail->{message}        =~ s/\r//g;
     $mail->{message}        =~ s/\n/<br>\n/g;
     $full_signature         =~ s/\n/<br>\n/g;
index 67f46fe..5b793d4 100644 (file)
@@ -209,7 +209,7 @@ sub _create_message {
   if ($self->{message}) {
     push @parts, Email::MIME->create(
       attributes => {
-        content_type => $self->{contenttype},
+        content_type => $self->{content_type},
         charset      => $self->{charset},
         encoding     => 'quoted-printable',
       },
@@ -217,7 +217,7 @@ sub _create_message {
     );
 
     push @{ $self->{headers} }, (
-      'Content-Type' => qq|$self->{contenttype}; charset="$self->{charset}"|,
+      'Content-Type' => qq|$self->{content_type}; charset="$self->{charset}"|,
     );
   }
 
@@ -243,12 +243,12 @@ sub send {
   }
 
   # Set defaults & headers
-  $self->{charset}       =  'UTF-8';
-  $self->{contenttype} ||=  "text/plain";
-  $self->{headers}       =  [
-    Subject              => $self->{subject},
-    'Message-ID'         => '<' . $self->_create_message_id . '>',
-    'X-Mailer'           => "kivitendo " . SL::Version->get_version,
+  $self->{charset}        =  'UTF-8';
+  $self->{content_type} ||=  "text/plain";
+  $self->{headers}        =  [
+    Subject               => $self->{subject},
+    'Message-ID'          => '<' . $self->_create_message_id . '>',
+    'X-Mailer'            => "kivitendo " . SL::Version->get_version,
   ];
   $self->{mail_attachments} = [];
   $self->{content_by_name}  = $::instance_conf->get_email_journal == 1 && $::instance_conf->get_doc_files;