Sending emails with Ruby using Gmail

I was looking for this some time ago, so posting here in case someone else finds it useful also.
I use it normally as an alert sender for automation's scripts.


Works naturally with regular ruby(1.8), but apparently also works with JRuby.

Depends on openssl gem. See at the end of code for command line commands to install it.

Code:

No comments: