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

yakischloba-em-mailer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yakischloba-em-mailer

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== em-mailer

Simple wrapper for EventMachine SMTP client, makes sending mail with EM easy! It uses tmail or tmail-pure for creating the mail messages. tmail-pure has no C and works on JRuby. Grab it here http://github.com/yakischloba/tmail-pure/tree/master

If you want, you can just pass your own TMail::Mail object to Mailer#send instead of using the Mailer#mail helper. This would be useful for fancy things like attachments.

== Synopsis

require 'rubygems' require 'eventmachine' require 'em-mailer'

mailer = EventMachine::Mailer.new( :domain => 'somedomain.com', :host => 'smtp.somemailserver.com', :username => 'spaceman', :password => 'afraidofasteroids', )

These callbacks will be executed for all mails sent with the mailer

mailer.callback { $stdout.puts "Sent successfully!"} mailer.errback {|e| $stdout.puts "you blew it: #{e}"}

EM.run { mailer.mail( :to => "asteroid@largegalaxy.com", :from => "spaceman@spacestation.com", :subject => "zomg", :body => "

HEY

Please don't hit me!

", :html => true ) }

== Other options

Set the port, defaults to 25.

:port => Integer

Enable SSL on the connection. Note that this is just normal SSL,

and not the STARTTLS command in the SMTP protocol.

:starttls => true/false

== Issues

The EM client only supports 'plain' auth for now.

FAQs

Package last updated on 10 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