use PublicInbox::Msgmap;
use PublicInbox::GitCatFile;
use PublicInbox::MID qw(mid2path);
-use Email::Simple;
+use Email::MIME;
use Data::Dumper qw(Dumper);
use POSIX qw(strftime);
use Time::HiRes qw(clock_gettime ualarm CLOCK_MONOTONIC);
sub new ($$$) {
my ($class, $sock, $nntpd) = @_;
my $self = fields::new($class);
+ binmode $sock, ':utf8'; # RFC 3977
$self->SUPER::new($sock);
$self->{nntpd} = $nntpd;
res($self, '201 server ready - post via email');
found:
my $o = 'HEAD:' . mid2path($mid);
my $bytes;
- my $s = eval { Email::Simple->new($ng->gcf->cat_file($o, \$bytes)) };
+ my $s = eval { Email::MIME->new($ng->gcf->cat_file($o, \$bytes)) };
return $err unless $s;
if ($set_headers) {
$s->header_set('Newsgroups', $ng->{name});