It would help
immensely if you could provide the data the SMTP server is sending in response. (Reading from
SMTP should work.) You aren't getting any errors because your script is functioning perfectly (well, almost; see below). The SMTP server is probably returning errors, however, but your script isn't reading any data from the socket, only sending it, so you'll never know.
With respects to the newline thing, it may be simplest to just set, say, $/ = "\r\n"; and terminate your lines with $/ instead. To be honest, most MTA's tend to not care whether you use \n or \r\n.
In addition, you may wish to spit out To: and From: headers in addition to your Subject: header. The MAIL FROM/RCPT TO stuff isn't really seen in the message itself.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.