How to use GMail’s SMTP Server with Rails

Rails' ActionMailer library can send e-mail for you, and while it can be set up to use almost any SMTP server, special requirements by Google's GMail SMTP server have presented Rails users from taking advantage of it. Ages ago I mentioned a solution to the problem, but it involved downloading a separate application called 'msmtp' and performing an ugly system call from your application.