English 中文(简体)
Perl 模块 - MPAS:Lite:TT:RUS, 发送超文本内容作为附录
原标题:Perl Module - MIME::Lite::TT::HTML, is sending HTML content as an attachment

这里是我手稿中的一刀子:

my %params = (
  sub_name            => $sub_name, 
  asm_name            => $asm_name,
  zsm                 => $zsm,
  store               => $store,
  pin                 => $pin,
  tier                => $tier,
  avg_weekly_all      => $avg_weekly_all,
  avg_weekly_br       => $avg_weekly_brakes,
  expected_sales      => $expected_sales,
  numOfBays           => $numOfBays,
  numOfTechs          => $numOfTechs,
  estimatedJobs       => $estimatedBrakeJobs,
  brand               => $brand,
  qty                 => $qty
);

my %options = (INCLUDE_PATH =>  . );

my $msg = MIME::Lite::TT::HTML->new(
  From        =>  xxx.xxxx@somecompany.com ,
  To          =>  me@somecompany.com ,
  Subject     => "Request (MSG ID: $id)",
  Template    => { html =>  edge14.html.tt  },
  TmplOptions => \%options,
  TmplParams  => \%params
);

$msg->attr("content-type" => "multipart/mixed");

$msg->attach(
  Type =>  text/csv ,
  Path =>  out.txt ,
  Filename => "brake_lift_$id" . ".csv",
  Disposition =>  attachment 
);

$msg->send or die "Unable to send message: $!";

发送电子邮件(附有附件)只是罚款,但它没有在电子邮件中提供html的内容。 它是以“ATT00001.htm”的形式发送的,并附上了“ATT00001.htm”格式的“TWO dots” 。

What am I doing wrong??

最佳回答

回答我自己的问题! 通知说,其他所有散射特性都是空洞的,因此,我引用了“连续型”的字句,它像一件大事!

问题回答

暂无回答




相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签