This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 66ae05a7396ae7ff9e88dea318b6252a72ffe44a
tree 3e9d409c4cbe2c160391229aaf166787b9edcb26
parent 2cf817b24dd69e9a1e608b0a2b4073ba6850148b
tree 3e9d409c4cbe2c160391229aaf166787b9edcb26
parent 2cf817b24dd69e9a1e608b0a2b4073ba6850148b
mack-more / mack-notifier
mack-notifier/README
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








