in reply to Net::SMTP - To: and From: not appearing in headers?

The reason why is that you are lacking carriage return/line feed pairs on your To, From, and Subject lines, as well as an extra one (creating a blank line) after the last of the headers, before the body of the message. While the SMTP transaction will figure out from the calls to the mail() and to() functions, the mail client has only the data when received, which RFC-2822 states, consists of:

A message consists of header fields (collectively called "the header of the message") followed, optionally, by a body. The header is a sequence of lines of characters with special syntax as defined in this standard. The body is simply a sequence of characters that follows the header and is separated from the header by an empty line (i.e., a line with nothing preceding the CRLF).
As it stands, the message you are attempting to send is being interpretted as a set of one or more header lines.

Hope that helps.

  • Comment on Re: Net::SMTP - To: and From: not appearing in headers?