From: Blanca Id Date: 2008-10-29T02:34:16+09:00 Subject: Re: download files from mail Hi, At last I found the solution, to download correctly excel files I use the 'wb' instead of 'w' on the open parameters. if body.subtype == "PLAIN" File.open(nameFile,'w') f.write(file) end else File.open(nameFile,'wb') f.write(file) end end bye -- Posted via http://www.ruby-forum.com/.