From: Dave Lilley Date: 2010-08-05T15:57:55+09:00 Subject: Re: net/smtp Brian Candler wrote: > Also note that #{Time.now} is not an RFC2822-compliant string. Try this: > > irb(main):001:0> require 'time' > => true > irb(main):002:0> Time.now.rfc2822 > => "Wed, 04 Aug 2010 12:40:02 +0100" many thanks for you're assistance Brian, I've removed the '\n' from the code and the date stuff so I am 1 step closer to what I want. _BUT_ I don't have any subject line!! it's still this.... [ No Subject ] ... From: "dave.xxx@isp.com" ... View Contact To: test message... I only put the date stuff in from looking at my original program. Any further advice? module is now this (using heredoc now too). require 'net/smtp' module Sendemail # edited def send_email(from, to, subject, message) # edited msg = "From: #{from} To: #{to} Subject: #{subject} #{message}" Net::SMTP.start('smtp.isp.com',25) do |smtp| smtp.send_message(msg, from, to) end end end Will keep on trying other things and googling. -- Posted via http://www.ruby-forum.com/.