sob#!/usr/bin/perl use strict; use Net::SMTP::Server; use Net::SMTP::Server::Client; open (OUT => ">outfile")|| die "Could not open $!"; print OUT "HELLO"; my $server=new Net::SMTP::Server("localhost","25"); while (my $conn=$server->accept()){ my $client=new Net::SMTP::Server::Client($conn) || die "Unable to handle client connection: $!"; $client->process; my $msg=$client->{MSG}; print OUT "$msg\n"; print $msg; }
In reply to File Handle wierdness by the_slycer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |