my @test = ("Row1", "Row2", "Row3");
my $attch = join("<cr><lf><br>\\n", @test);
$message = MIME::Lite->new(
From => $mailFrom ,
To => $address,
Subject => $title,
Type => 'text/html',
Encoding => '8bit',
Data => $data
);
$message->attach(
Type =>'TEXT',
Data => $attch
);
MIME::Lite->send('smtp', $host, Timeout => 20);
$message->send;
美好的一天,我正在尝试通过电子邮件发送文件,但我无法编写正确的换行符,代码发送带有附件的电子邮件,此附件包含下一个信息:
“Row1<cr><lf><br >\nRow2<cr><lf><br>\nRow3"
我如何获得:
第 1
行第 2 行第 3
行
在附件中?