我正在使用Mail :: Sender模块发送邮件。但今天我在$ Mail :: Sender :: Error变量中收到以下错误消息。 “未建立连接”
我使用以下代码发送邮件
$Msg = new Mail::Sender (
{
smtp => SMTP_IP,
debug_level => 4,
port => '2255',
debug => '/tmp/mail_sync.log'
}
);
$Msg->OpenMultipart({
from => xxxx@gmail.com,
to => xxxx@gmail.com,
subject => testing,
debug => '/tmp/log.log',
multipart => 'related',
})
->Part({ctype => 'multipart/alternative'})
->Part({ctype => 'text/html', disposition => 'NONE', msg => "
<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>
<html>
<head>
</head>
<body bgcolor=#ffffff text=#000000>
xxxxx ( Some HTML Content )
</body>
</html>" })
->EndPart("multipart/alternative");
$Msg->Attach({
description => 'fax1 jpg',
ctype => 'image/jpeg',
encoding => 'base64',
disposition => "attachment; filename=1111;",
file => 'filename',
});
$Msg->Close();
}
有什么错吗?出于什么原因我收到此错误消息?