#
above, so its commented.
#
$remote
$port
= 25;
$iaddr
= inet_aton($remote) || die "no host:
\"$remote\"\n";
$paddr
= sockaddr_in($port, $iaddr);
$proto
= getprotobyname('tcp');
select(SOCK);
$| = 1;
socket(SOCK, PF_INET, SOCK_STREAM, $proto) || die "socket:
$!";
connect(SOCK, $paddr) || die "connect: ". @SOCK ." : $!";
print SOCK "HELO $whoami\r\n";
sleep(2);
print SOCK "MAIL FROM: $mf\r\n";
sleep(2);
print SOCK "RCPT TO: $to\r\n";
sleep(2);
print SOCK "DATA\r\n";
#
print SOCK "From: $mf\r\n";
print SOCK "Subject: $subj\r\n";
print SOCK "To: $to\r\n";
print SOCK "\r\n";
print SOCK @msg;
print SOCK "\r\n.\r\n";
sleep(2);
print SOCK "QUIT\r\n";
sleep(2);
close (SOCK) || die "close: $!";
}
#
# Main ()
#
my ($whoami, $hostname, $mf, @tolist, $subj, $to, $domail);
$whoami
= "ConsoleWorks";
#
#+
# For Exchange 2000 server uncomment the following 2 lines
use Sys::Hostname;
$hostname = hostname();
#
# For Exchange server uncomment the following line
#$hostname = `hostname`;
#-
#
$mf
= "$whoami\@$hostname";
@tolist
= split /,/, $ARGV[4];
$domail
= 1;
B-10
System Management Console User's Guide
= "my.email.server.name.net";
# Force flush after every write or print
Need help?
Do you have a question about the AlphaServer GS80 and is the answer not in the manual?
Questions and answers