500附加文件时发生内部服务器错误,但发送时没有附件时发生。MIME :: Lite错误附加文件perl
use MIME::Lite;
$msg = MIME::Lite->new(
From =>'[email protected]',
To =>'[email protected]',
Subject =>'A message with 2 parts...',
CC => '',
Type =>'TEXT',
Data =>'Thank you for your interest in'
);
### If I comment out the following attachment code the email sends OK, otherwise i get 500 internal server error
$msg->attach(
Type =>'image/gif',
Path =>'/images/tree.gif',
Filename =>'tree.gif',
Disposition => 'attachment'
)or die "error attaching file\n";
$msg->send;
您必须检查您的Web服务器日志以查看实际错误。 – Schwern 2013-05-04 01:53:08