I am using the mail gem for Ruby https://github.com/mikel/mail
How do I send an email via an smtp server? How do I specify the address and port? And what settings should I use for Gmail?
The README on github only gives examples sending by a local server.
From http://lindsaar.net/2010/3/15/how_to_use_mail_and_actionmailer_3_with_gmail_smtp
To send out via GMail, you need to configure the
Mail::SMTPclass to have the correct values, so to try this out, open up IRB and type the following:The last block calls
Mail.defaultswhich allows us to set the global delivery method for all mail objects that get created from now on. Power user tip, you don’t have to use the global method, you can define the delivery_method directly on any individualMail::Messageobject and have different delivery agents per email, this is useful if you are building an application that has multiple users with different servers handling their email.