in reply to Perl mailing list

it's kinda hard to post this cause it almost caused a divorce *heh*, took me about 6 months to compress into a simple routine. there wasn't much info on this anywhere. hope it helps...
###################################################################### # (Author) PriNet (c)542R767G265A (e-)gary@prinet.org ###################################################################### # sub::email(www.server.com,bounce@address,send@to,from,to,subj,body); ###################################################################### # www.server.com = mail servers address, ie; "mail.isp.com" # bounce@address = a valid email address on "isp.com" # send@to = email address to send to # from = (hopefully) YOUR REAL NAME # to = recipients name (not address) # subj = subject # body = message ###################################################################### sub email { @Data = @_; $main::SIG{'INT'} = close (SMTP); socket (SMTP, AF_INET, SOCK_STREAM, 6); connect (SMTP, pack('S n a4 x8', AF_INET, 25, (gethostbyname($Data +[0])) [4])); select (SMTP); $| = 1; select (STDOUT); recv (SMTP, $Dummy, 200, 0); send (SMTP, "HELO $Data[0]\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "MAIL FROM: <$Data[1]>\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "RCPT TO: <$Data[2]>\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "DATA\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "From: \"$Data[3]\"\n", 0); send (SMTP, "To: $Data[4]\n", 0); send (SMTP, "Subject: $Data[5]\n", 0); send (SMTP, "\n", 0); send (SMTP, "$Data[6]\n", 0); send (SMTP, "\r\n.\r\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "QUIT\n", 0); recv (SMTP, $Dummy, 200, 0); close (SMTP); return; ######################################################################
try to give me credit (PriNet) if you use this
NO SPAM !!!


you mean there's any easier way?