1 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
2 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
11 my $s = Email::Simple->create(
13 From => 'a@example.com',
14 To => 'b@example.com',
15 'Content-Type' => 'text/plain',
16 'Message-ID' => '<hello@example.com>',
17 Subject => 'this is a subject',
19 body => "hello world\n",
21 $s = Email::MIME->new($s->as_string);
22 my $html = PublicInbox::View->as_html($s);
25 like($html, qr/<a href="hello%40/s, "MID link present");
26 like($html, qr/hello world\b/, "body present");
33 attributes => { content_type => 'text/plain', },
37 attributes => { content_type => 'text/plain', },
41 my $mime = Email::MIME->create(
43 From => 'a@example.com',
45 'Message-ID' => '<blah@xeample.com>',
46 'In-Reply-To' => '<irp@xeample.com>',
51 my $html = PublicInbox::View->as_html($mime);