0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
My fork of Adam Wiggins' Pony project.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 1.0
 Project Readme

Pony, the express way to send email in Ruby¶ ↑

Overview¶ ↑

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

Pony.mail(:to => 'you@example.com', :from => 'me@example.com', :subject => 'hi', :body => 'Hello there.')

Any option key may be omitted except for :to.

Transport¶ ↑

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 => 'you@example.com', :via => :smtp) # sends via SMTP

Pony.mail(:to => 'you@example.com', :via => :sendmail) # sends via sendmail

You can also specify options for SMTP:

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

TLS¶ ↑

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

Meta¶ ↑

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: www.opensource.org/licenses/mit-license.php

Adam’s Pony: github.com/adamwiggins/pony

My fork: github.com/Narnach/pony