- 论坛徽章:
- 0
|
#!/usr/bin/perl -w
open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")
or die "Can't fork for sendmail: $!\n";
print SENDMAIL <<"EOF";
From: User Originating Mail <root\@localhost>
To: Final Destination <postmaster\@localhost>
Subject: here is the subject
here is the body ,GOOD LUCK!!
EOF
close(SENDMAIL) or warn "sendmail didn't close nicely";
maillog如下
Dec 14 13:33:49 centOS02 sendmail[5509]: mBEIXnom005509: from=root, size=149, class=0, nrcpts=1, msgid=<200812141833.mBEIXnom005509@centOS02>, relay=root@localhost
Dec 14 13:33:49 centOS02 sendmail[5509]: mBEIXnom005509: to=Final Destination <postmaster@localhost>, delay=00:00:00, mailer=relay, pri=30149, stat=queued
可
# mail
No mail for root
哪位指点一下 |
|