无法使用邮件发送邮件:发件人在perl中

时间:2012-02-16 12:16:51

标签: perl scripting

use strict;
use warnings;
use Mail::Sender;

$::sender = new Mail::Sender
  {smtp => 'xx.xx.xx.xxx', from => 'abc@xyz.com'};

$::sender->MailFile({to => 'abc@xyz.com',
  subject => 'Here is the file',
  msg => "I'm sending you the list you wanted.",
  });

1 个答案:

答案 0 :(得分:1)

您实际上不发送任何文件。试试这个:

$::sender->MailFile({to => 'abc@xyz.com',
  subject => 'Here is the file',
  msg => "I'm sending you the list you wanted.",
  file => 'full_path_to_your_attachment'});

Mail::Sender documentation表示file参数是强制性的。