Skip to content

Instantly share code, notes, and snippets.

@samcv

samcv/mail.t Secret

Created August 18, 2017 21:42
Show Gist options
  • Save samcv/5b8d633188baba6297ada02fd7bc8516 to your computer and use it in GitHub Desktop.
Save samcv/5b8d633188baba6297ada02fd7bc8516 to your computer and use it in GitHub Desktop.
use Test;
use Email::Simple;
my $nr = "\n\r";
my $nasty = "S: f{$nr}{$nr}";
my $mail = Email::Simple.new($nasty);
my $mail-str = $mail.Str;
if $mail-str.NFC.Str eq $nasty {
is $mail.Str, $nasty.Str, "Round trip nasty";
done-testing;
}
else {
say "\$mail.Str.NFC.Str ne \$nasty\n\$mail.Str equals: $mail-str.perl() ne $nasty.perl()";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment