Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ddollar-pony

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ddollar-pony

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

= 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', :pass => 'pass', :auth => :plain # :plain, :login, :cram_md5, no auth by default :domain => "localhost.localdomain" # the HELO domain provided by the client to the server }

== TLS/SSL

With smtp transport it also possible to use TLS/SSL:

Pony.mail(:to => 'you@example.com', :via => :smtp, :smtp => { :host => 'smtp.gmail.com', :port => '587', :tls => true, :user => 'user', :pass => 'pass', :auth => :plain # :plain, :login, :cram_md5, no auth by default :domain => "localhost.localdomain" # the HELO domain provided by the client to the server })

== Attachments

You can attach a file or two with the :attachments option:

Pony.mail(..., :attachments => {"foo.zip" => File.read("path/to/foo.zip"), "hello.txt" => "hello!"})

== 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

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc