I am using the following command to create messages on the fly, and send them:
echo "Subject:Hello \n\n I would like to buy a hamburger\n" | sendmail email@example.com
It seems that when you send the information from a file, by doing something like:
sendmail firstname.lastname@example.org mail.txt
Then sendmail sees each line as a header, and parses it. But the way I sent it above, everything ends up in the subject line.
If one wants to echo a message complete with headers, into sendmail, then what is the format ? How does one do it ?