Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The express way to send mail from Ruby. (Patched for TLS support)

tag: 0.3.2

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile

Pony, the express way to send email in Ruby


Ruby no longer has to be jealous of PHP's mail() function, which can send an email in a single command.

Pony.mail(:to => '', :from => '', :subject => 'hi', :body => 'Hello there.')

Any option key may be omitted except for :to.


Pony uses /usr/sbin/sendmail to send mail if it is available, otherwise it uses SMTP to localhost.

This can be over-ridden if you specify a via option

Pony.mail(:to => '', :via => :smtp) # sends via SMTP

Pony.mail(:to => '', :via => :sendmail) # sends via sendmail

You can also specify options for SMTP:

Pony.mail(:to => '', :via => :smtp, :smtp => {
  :host     => '',
  :port     => '25',
  :user     => 'user',
  :password => 'pass',
  :auth     => :plain,           # :plain, :login, :cram_md5, no auth by default
  :domain   => ""     # the HELO domain provided by the client to the server


To use TLS in ruby 1.8.6, install the smtp_tls gem. Ruby 1.8.7 has built-in TLS support.


Written by Adam Wiggins This fork is maintained by Wes Oldenbeuving. All praise goes to Adam, all problems are reported to me :)

Patches contributed by: Mathieu Martin, Arun Thampi, Thomas Hurst, Stephen Celis, Othmane Benkirane, and Neil Mock

Released under the MIT License:

Adam's Pony:

My fork:

Something went wrong with that request. Please try again.