From: Chad Perrin Date: 2008-11-18T05:09:08+09:00 Subject: Re: [solved, kinda] Re: Why does tmail stop my CGI script form working? --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 18, 2008 at 05:05:32AM +0900, James Gray wrote: > On Nov 17, 2008, at 1:54 PM, Chad Perrin wrote: > > > > sent =3D open( %Q{| mail -s "#{sub_c}" #{to_c} }, 'w' ) do |msg| > > msg << body_c > > end >=20 > Is sent meant to contain the output? If so, we should probably change = =20 > that code to: >=20 > sent =3D open(%Q{| mail -s"#{sub_c}" #{to_c} }, "r+") do |mail| > mail << body_c > mail.close_write > mail.read > end Actually, I stuck the sent variable in there for diagnostic purposes and just forgot to remove it before copying and pasting. >=20 > I've never used that feature myself, but I suspect you would use it =20 > like this: >=20 > mail << "~s #{sub_c}\n#{body_c}" >=20 > I'm guessing though and could be wrong. Double check me there. Thanks. I'll look into that. --=20 Chad Perrin [ content licensed PDL: http://pdl.apotheon.org ] Quoth Peter Norvig: "Use the most natural notation available to solve the problem, and then worry about writing an interpreter for that notation." --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkh0DcACgkQ9mn/Pj01uKWQDQCgkFjr2k79b39Og5dbLd/oV6uA +iEAnjQUPST6PJy7AG2RqMRX6HWtfoYn =OCCL -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--