If you are experiencing a timeout, I'd starting looking at a possible network issue. You say you're using a mail client on the same machine, but it may be using a different port/protocol.
I'd log into the box running the ruby on rails app, and try telnet'ing to port 25. You may find out that you can't connect. If you can, try talking SMTP to send a message:
$ telnet mail.example.com 25
220 mail.example.com Microsoft ESMTP MAIL Service, Version: x.x.xxxx.xxxx ready at Thu, 12 Apr 2012 14:55:10 -0400
HELO yourfqdn.example.com
MAIL FROM: youruser@example.com
RCPT TO: user@example.com
DATA
(enter message)
.
If you can't connect, or exchange spits back an error while trying to submit a message, your issue doesn't revolve around code at all.