Sha256: e9778e2d3270d60d2a80d38029623bb55f6280bd22838d63e8ddc8f01c7052fb

Contents?: true

Size: 1.14 KB

Versions: 8

Compression:

Stored size: 1.14 KB

Contents

This gem provides a simple API for creating emails within a Mack application.

A simple Mack::Notifier model would look like this:

  class WelcomeEmail
    include Mack::Notifier
  end
  
To use this in your application you would do something like the following:
 
  mail = WelcomeEmail.new
  mail.to = "foo@example.com"
  mail.from = "me@example.com"
  mail.subject = "Hello"
  mail.body(:plain, "This is my plain text body")
  mail.body(:html, "This is my <b>HTML</b> body")
  mail.attach(Mack::Notifier::Attachment.new("/path/to/my/image_file.png"))
  mail.attach(Mack::Notifier::Attachment.new("/path/to/my/pdf_file.pdf"))
  mail.deliver
  
This gem currently has an adapter for TMail, but it can support any mailing
framework under the covers with the creation of a simple adapter class.

Currently implemented delivery handlers are: SMTP (default), sendmail, and test.

== Testing

When testing you can get access to delivered emails with the delivered_notifiers
method. After each tests these emails will be flushed our of the test handler.

== Rake tasks
  
  # Generates a notifier model, a test, and text and html template files.
  rake generate:notifier

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mack-notifier-0.8.0.1 README
mack-notifier-0.8.0.2 README
mack-notifier-0.8.1 README
mack-notifier-0.8.0 README
mack-notifier-0.8.0.101 README
mack-notifier-0.8.2 README
mack-notifier-0.8.3 README
mack-notifier-0.8.3.1 README