public
Description: A simple gem to send email through gmail
Homepage:
Clone URL: git://github.com/dcadenas/gmail_sender.git
name age message
file .document Thu May 21 01:18:32 -0700 2009 Initial commit to gmail_sender. [dcadenas]
file .gitignore Thu May 21 01:18:32 -0700 2009 Initial commit to gmail_sender. [dcadenas]
file LICENSE Thu May 21 01:18:32 -0700 2009 Initial commit to gmail_sender. [dcadenas]
file README.rdoc Sun Nov 01 18:55:50 -0800 2009 Added command line functionality (thanks fcuory!) [dcadenas]
file Rakefile Thu May 21 01:18:32 -0700 2009 Initial commit to gmail_sender. [dcadenas]
file VERSION Sun Nov 01 18:56:29 -0800 2009 Version bump to 0.2.0 [dcadenas]
directory bin/ Sun Nov 01 18:55:50 -0800 2009 Added command line functionality (thanks fcuory!) [dcadenas]
file gmail_sender.gemspec Sun Nov 01 18:58:10 -0800 2009 Regenerated gemspec for version 0.2.0 [dcadenas]
directory lib/ Sun Nov 01 18:55:50 -0800 2009 Added command line functionality (thanks fcuory!) [dcadenas]
directory test/ Sun Nov 01 18:55:50 -0800 2009 Added command line functionality (thanks fcuory!) [dcadenas]
README.rdoc

gmail_sender

A simple gem to send email through gmail

  require 'rubygems'
  require 'gmail_sender'

  g = GmailSender.new("gmail_account_user_name", "gmail_account_password")
  g.send("someone@domain.com", "The subject", "The mail body")

Command line usage

You can also use gmail_sender from the command line. First you need to create ~/.gmail with this content (YAML):

  receiver_email: default_receiver@gmail.com
  sender_user: gmail_account_user_name
  sender_password: gmail_account_password

Is advisable to use a different sender account than your main email address so that it’s not so bad if someone reads your configuration file and gets your password.

Examples

To send your directory list to the default receiver:

  ls | gmail

You can specify some parameters like in this example which doesn’t use pipes:

  gmail -t somebody@gmail.com -s "This is the subject" -c "This is the email content"

Requirements

tlsmail if running Ruby 1.8.6

Major contributors

  • Daniel Cadenas - Maintainer
  • Felipe Coury