> I have searched RAA and ruby-talk (esp. [40428]) and I have > still not managed to find a simple solution to "sending email with > binary attachments" on Windows. The code given in ruby-talk > [40429] is badly mangled and I tried resurrecting it , but am not > sure about lines 37 thru 57 (if they do not get further mangled). > > I get the following error: > > error on sending: The remote adapter is not compatible - connect(2) > > Also, does the ability to "create MIME e-mail" automatically > imply attachment functionality ? If yes, then I guess I need to > figure it out with Tmail and RubyMail. I don't know what generates the error you get, but you have some bugs here: > > def sendMail() > > raise "mail server not specified" if(@server.length == 0) > raise "sender address not specified" if(@from.length == 0) > raise "receiver address not specified" if(@to.length == 0) > > #raise "nothing to send" > if((@text.length==0)&(@attachments.length==0)) > > smtp = Net::SMTP.new(@server) > smtp.start() > smtp.ready(@from, @to) do |wa| > wa.write("Reply-To:{@from}\r\n") ^^^^^^--- should be #{@from} > wa.write("To:{@to}\r\n") ^^^^^--- should be #{@to} > > wa.write("Subject:{@subject}\r\n") ^^^^^^^^^^-- #{@subject} > > wa.write("MIME-Version:.0\r\n") Add the '#' and maybe will work.