From: Brian Candler Date: 2010-05-02T21:35:21+09:00 Subject: Re: Sendmail, semicolons and new lines Toby Rodwell wrote: > I focused my attention on the file I'm > feeding into Sendmail, and whilst I don't pretend to understand it, I > find if I add two newlines ("\n\n") before my list of lines ending in > semicolons then it works as desired. Ah. An E-mail message consists of headers and a body, and they are separated by a blank line (see RFC 2822 for the full details) So if you want to send an E-mail and don't want to specify any headers, you need a blank line at the top. An E-mail like that is invalid, so sendmail will add a minimal set of headers for you anyway (e.g. To: is the recipient(s) you provided on sendmail command line, From: is the user who submitted the message) It's better to provide the headers explicitly, and if you use sendmail -t then the recipients are taken from the To:/Cc:/Bcc: headers that you provide, so you don't need to provide them on the sendmail command line. Regards, Brian. -- Posted via http://www.ruby-forum.com/.