From: Brian Candler Date: 2010-05-02T17:41:42+09:00 Subject: Re: Sendmail, semicolons and new lines Toby Rodwell wrote: > I know the tile doesn't sound very Ruby-related but please bear with me! > In a Ruby script I make a system call to 'sendmail' to send text from a > file I've created from a Ruby string (I use sendmail because I don't > have and cannot easily get 'mail' or other gems added to this machine). > > All works fine until I try to to include semi-colons at the end of each > lne of text, ie "....;\n", at which point sendmail considers these as > comments, ignores the "\n" newline cahracters, and everything gets > printed on one line. Looking at sendmails manual this seems to be > expeced behaviour This is complete nonsense. Sendmail doesn't handle semicolons in mail bodies any differently from any other characters. If you post your actual ruby code, we can tell you what's wrong with it, but it's certainly nothing to do with sendmail. Probably the best way to do it is to start sendmail using IO.popen and then write the message body to the pipe. -- Posted via http://www.ruby-forum.com/.