EPrints.pm.diff

From EPrints

Jump to: navigation, search
*** eprints-3.0.2-beta-3/perl_lib/EPrints/Email.pm     2007-06-13 16:13:52.000000000 +0200
--- eprints-3.0.1Z/perl_lib/EPrints/Email.pm   2007-06-28 13:19:33.000000000 +0200
***************
*** 230,245 ****
       my $repository = $p{session}->get_repository;
       my $mimemsg = MIME::Lite->new(
!              From       => "$p{from_name} <$p{from_email}>",
!              To         => "$p{to_name} <$p{to_email}>",
!              Subject    => $p{subject},
               Type       => "multipart/alternative",
               Precedence => "bulk",
       );
       if( defined $p{replyto_email} )
       {
!              $mimemsg->attr( "Reply-to" => "$p{replyto_name} <$p{replyto_email}>" );
       }
       $mimemsg->replace( "X-Mailer" => "EPrints http://eprints.org/" );
--- 230,245 ----
       my $repository = $p{session}->get_repository;
       my $mimemsg = MIME::Lite->new(
!              From       => encode_utf8_b($p{from_name})." <$p{from_email}>",
!              To         => encode_utf8_b($p{to_name})." <$p{to_email}>",
!              Subject    => encode_utf8_b($p{subject}),
               Type       => "multipart/alternative",
               Precedence => "bulk",
       );
 
       if( defined $p{replyto_email} )
       {
!              $mimemsg->attr( "Reply-to" => encode_utf8_b($p{replyto_name})." <$p{replyto_email}>" );
       }
       $mimemsg->replace( "X-Mailer" => "EPrints http://eprints.org/" );
 
***************
*** 256,276 ****
               );
               $mixedmsg->attach( $mimemsg );
       }
!
!      my $xml_mail = $p{message};
!      my $data = EPrints::Utils::tree_to_utf8( $xml_mail , $MAILWIDTH, 0, 0, 1 );
!
       my $text = MIME::Lite->new(
               Type  => "TEXT",
               Data  => $data
       );
       $text->attr("Content-disposition" => "");
       $mimemsg->attach( $text );
       my $html = MIME::Lite->new(
               Type  => "text/html",
!              Data  => $xml_mail->toString,
       );
       $html->attr("Content-disposition" => "");
       $mimemsg->attach( $html );

       for( @{ $p{attach} } )
--- 256,283 ----
               );
               $mixedmsg->attach( $mimemsg );
       }
!      #don't strip links
!      my $data = EPrints::Utils::tree_to_utf8( $p{message}, $MAILWIDTH, 0, 0, 0 );
!      my $txtdata = $p{message}->toString;
!
!         {## convert long characters to bytes
!              use bytes;
!              $data .= "";
!              $txtdata .= "";
!         }
       my $text = MIME::Lite->new(
               Type  => "TEXT",
               Data  => $data
       );
       $text->attr("Content-disposition" => "");
+         $text->attr("Content-Type.charset" => "UTF-8");
       $mimemsg->attach( $text );
       my $html = MIME::Lite->new(
               Type  => "text/html",
!              Data  => $txtdata,
       );
       $html->attr("Content-disposition" => "");
+         $html->attr("Content-Type.charset" => "UTF-8");
       $mimemsg->attach( $html );

       for( @{ $p{attach} } )
***************
*** 286,292 ****
       return $mimemsg;
  }

!
Personal tools