All Projects → adamwiggins → Pony

adamwiggins / Pony

The official fork is now maintained by benprew in http://github.com/benprew/pony

Programming Languages

ruby
36898 projects - #4 most used programming language

This fork is no longer maintained. Please visit: http://github.com/benprew/pony


= 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 => '[email protected]', :from => '[email protected]', :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 => '[email protected]', :via => :smtp) # sends via SMTP

Pony.mail(:to => '[email protected]', :via => :sendmail) # sends via sendmail

You can also specify options for SMTP:

Pony.mail(:to => '[email protected]', :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 }

== Meta

Written by Adam Wiggins

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

Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

http://github.com/adamwiggins/pony

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].