FastNetMon

Sunday, 28 February 2010

Как послать письмо из Perl, используя /usr/bin/mail?

perl -e 'open my $mail, "| mail -s test test\@domain.ru" or die; print $mail "body"; close $mail '

2 comments :

  1. 1.| use MIME::Lite;
    2.| $msg = MIME::Lite->new (
    3.| From =>'John Doe ',
    4.| To =>'Frank Smith ',
    5.| Subject =>'Test.',
    6.| Data =>"It's just test!!!"
    7.| );
    8.| $msg->send;

    ReplyDelete
  2. Тоже отличный вариант!

    ReplyDelete

Note: only a member of this blog may post a comment.