From: Heesob Park Date: 2009-06-24T15:47:12+09:00 Subject: Re: smtp - from field shows up blank in client Hi, 2009/6/24 Anand Srinu <2006hz13084@dlpd.bits-pilani.ac.in>: > Hi All, > > I am facing a unique problem. Even though I am setting all the > parameters as found in many of the turorials, I am not getting the > subject header in the mail. > > The code used : > > msgstr = <    From: My Name >    To: Another Name   >    Subject: test message >    Date: Sat, 23 Jun 2001 16:26:43 +0900 >    Content-type: text/html > >    This is a test message. > EOF > > from  = 'fgdsgf@gfgsdfg.com' > to = 'dfgdfsdfgfd@sdfggdgsdf.com' > > Net::SMTP.start('my.mail.server', 25) do |smtp| >  smtp.send_message msgstr,from,to > end > > The from is appearing in the mail from field, but the subject is not > getting populated. Please help me in this issue. > You should remove spaces in front of each lines like this: msgstr = < To: Another Name Subject: test message Date: Sat, 23 Jun 2001 16:26:43 +0900 Content-type: text/html This is a test message. EOF Regards, Park Heesob