From: Tamara Temple Date: 2013-07-11T09:53:51+09:00 Subject: Re: execute commands within SMTP email code: send content in variables and not actual variables Just want to point out something quick: On Jul 10, 2013, at 10:38 AM, dJD col wrote: > File.open("/home/path/Document.txt","r") do |file| > ms=file This does not read the contents of Document.txt. All it does is assign the file handle to the local variable ms. What you probably want at this point is: ms = file.read However, as was previously pointed out, just doing ms = FIle.read("/home/path/Document.txt") Is a lot simpler at this stage. Further: > msgstr = < ... > ms > > EOF When you get to the ms in your message body, it's just a string at that point. As was pointed out. you need to interpolate it: msgstr = <