so I've been looking at this for too long, and can't make sense of why its not working?
no, Net::SMTP and Mail::Send are not on this box and it takes forever to get modules installed on this box..

if($EMAILS) { socket(MAIL,PF_INET,SOCK_STREAM,getprotobyname('tcp')) +; connect(MAIL,sockaddr_in(25,inet_aton($MAILHOST))) || +die "$!\n";; select MAIL; $|++; select STDOUT; print MAIL "HELO mydoamain.net\r\n"; print "Emailing users: "; for(split(/,/,$EMAILS)) { print "$_, "; print MAIL "MAIL FROM: $from\n"; print MAIL "RCPT TO: $_\n"; print MAIL "DATA\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$data\n"; print MAIL ".\r\n"; } print "done. \n"; print MAIL "QUIT\r\n"; close MAIL; }
$EMAILS is a comma delimited string of email addresses.. I've tried all sorts of combinations with \r and \n and can't seem to get it to work, the script acts as though its working, but it doesn't send me mail, the connections don't fail and no errors are thrown anywhere..
I tested the mail server by telnetting to it on port 25 and issuing the EXACT commands the script is and its working.. I'm kinda lost on this one..

I'm trying to avoid a pipe to sendmail directly being that this SHOULD work.

-brad..

In reply to baffled by the sendmail.. by reyjrar

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.