- my $mime = Email::MIME->new("Message-ID: <$mid>\r\n\r\n");
- PublicInbox::NNTP::set_nntp_headers($mime->header_obj, $ng, 1, $mid);
+ my $mime = PublicInbox::Eml->new("Message-ID: <$mid>\r\n\r\n");
+ my $hdr = $mime->header_obj;
+ my $mock_self = {
+ nntpd => {
+ servername => 'example.com',
+ pi_cfg => bless {}, 'PublicInbox::Config',
+ },
+ ibx => $ibx,
+ };
+ my $smsg = { num => 1, mid => $mid, nntp => $mock_self, -ibx => $ibx };
+ PublicInbox::NNTP::set_nntp_headers($hdr, $smsg);