Email-Outlook-Message

 view release on metacpan or  search on metacpan

lib/Email/Outlook/Message.pm  view on Meta::CPAN

}

# Implementation based on the information in
# http://www.freeutils.net/source/jtnef/rtfcompressed.jsp,
# and the implementation in tnef version 1.4.5.
my $MAGIC_COMPRESSED_RTF = 0x75465a4c;
my $MAGIC_UNCOMPRESSED_RTF = 0x414c454d;
my $BASE_BUFFER =
  "{\\rtf1\\ansi\\mac\\deff0\\deftab720{\\fonttbl;}{\\f0\\fnil \\froman "
  . "\\fswiss \\fmodern \\fscript \\fdecor MS Sans SerifSymbolArial"
  . "Times New RomanCourier{\\colortbl\\red0\\green0\\blue0\n\r\\par "
  . "\\pard\\plain\\f0\\fs20\\b\\i\\u\\tab\\tx";


sub _create_mime_rtf_body {
  my $self = shift;
  my $data = $self->{BODY_RTF};

  my ($size, $rawsize, $magic, $crc) = unpack "V4", substr $data, 0, 16;

  my $buffer;

t/plain_uc_unsent.t  view on Meta::CPAN

is(scalar($text->subparts), 0, "No sub-parts");

my $rtf = $parts[1];
like($rtf->content_type, qr{^application/rtf}, "Content type should be application/rtf");
is($rtf->header("Content-Disposition"), "inline", "Testing content disposition");
is($rtf->body, "{\\rtf1\\ansi\\ansicpg1252\\fromtext \\deff0{\\fonttbl\n\r"
  . "{\\f0\\fswiss Arial;}\n\r"
  . "{\\f1\\fmodern Courier New;}\n\r"
  . "{\\f2\\fnil\\fcharset2 Symbol;}\n\r"
  . "{\\f3\\fmodern\\fcharset0 Courier New;}}\n\r"
  . "{\\colortbl\\red0\\green0\\blue0;\\red0\\green0\\blue255;}\n\r"
  . "\\uc1\\pard\\plain\\deftab360 \\f0\\fs20 This is a test\\par\n\r"
  . "The body is in plain text\\par\n\r"
  . "}", "Check RTF");
is(scalar($rtf->subparts), 0, "No sub-parts");



( run in 0.274 second using v1.01-cache-2.11-cpan-87723dcf8b7 )