Docunext


Pony Easy Emailing with Ruby

February 21st, 2010

I just found out about Pony, a Ruby gem for sending emails.

The cool thing about Pony is how simple it is. Good work, people!

  Pony.mail(:to => 'email@example.com', :via => :smtp, :smtp => {
    :host     => 'smtp.example.com',
    :port     => '25',
    :user     => 'username',
    :password => 'passkey',
    :auth     => :plain,
    :domain   => "example.com"
  },
  :from => 'me@example.com', :subject => 'hi', :body => 'Hello there.')

I'm planning on using this with Sinatra, but I'll probably end up using it with some Ruby scripts as well.

Speaking of which, I bought a book about using Ruby for systems administration awhile back. It had some really cool ideas in it, but I wasn't as comfortable with Ruby back then as I am now.

I definitely have to give this book a review!

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022