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?

In reply to Re: Perl mailing list by PriNet
in thread Perl mailing list by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.