Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 93 lines (67 sloc) 2.883 kB
3315946 @redsquirrel Tweaking the README
authored
1 = Mad Mimi Mailer
5f84584 first commit
Dave Hoover authored
2
fb3b319 @redsquirrel Correcting name of mimi add-on
authored
3 * http://developer.madmimi.com - Learn more about the API used by this gem
3315946 @redsquirrel Tweaking the README
authored
4 * http://madmimi.com - Sign up for a Mad Mimi account
5f84584 first commit
Dave Hoover authored
5
6 == DESCRIPTION:
7
4508964 @redsquirrel Adding a TODO
authored
8 Let Mad Mimi handle your HTML emails. This is a drop-in replacement
5f84584 first commit
Dave Hoover authored
9 for ActionMailer. MadMimiMailer extends ActionMailer::Base, so you
10 can intermingle normal ActionMailer emails with emails sent via
4508964 @redsquirrel Adding a TODO
authored
11 Mad Mimi. Just start your Mad Mimi-specific emails with
12 deliver_mimi_foo and it will send your Mad Mimi promotion named "foo".
5f84584 first commit
Dave Hoover authored
13 Oh, and it will also automatically import the recipient into your
4508964 @redsquirrel Adding a TODO
authored
14 Mad Mimi account.
5f84584 first commit
Dave Hoover authored
15
16 == TODO:
17
4508964 @redsquirrel Adding a TODO
authored
18 * If something goes wrong with the call to Mad Mimi, fallback and use plain old local Rails templates.
19 * Document how body data can be used in Mad Mimi templates
e359c8a Enabling sending with normal ERB templates using the raw_html API par…
Dave Hoover authored
20 * Document promotion, hidden, and use_erb options
5f84584 first commit
Dave Hoover authored
21
22 == SYNOPSIS:
23
8c56c70 @redsquirrel Correcting README
authored
24 class UserNotifier < MadMimiMailer
3315946 @redsquirrel Tweaking the README
authored
25 def mimi_welcome(user)
26 subject "Welcome to WidgetHub"
27 recipients user.email
28 bcc ADMIN_PEEPS
29 from "admin@example.com"
30 body :username => user.name, :email => user.email, :password => user.password
31 end
5f84584 first commit
Dave Hoover authored
32
3315946 @redsquirrel Tweaking the README
authored
33 def reset(user)
34 subject "Resetting your WidgetHub account"
35 recipients user.email
36 bcc ADMIN_PEEPS
37 from "admin@example.com"
38 body :user => user
39 end
5f84584 first commit
Dave Hoover authored
40 end
41
e359c8a Enabling sending with normal ERB templates using the raw_html API par…
Dave Hoover authored
42 MadMimiMailer.api_settings = {
43 :username => 'dave@example.com',
44 :api_key => '75a6c6f1SomeFakeApiKeycbcc300'
45 }
5f84584 first commit
Dave Hoover authored
46
3315946 @redsquirrel Tweaking the README
authored
47 user = User.first
5f84584 first commit
Dave Hoover authored
48
4fa7020 @redsquirrel More README tweaking
authored
49 # Sent via Mad Mimi
3315946 @redsquirrel Tweaking the README
authored
50 UserNotifier.deliver_mimi_welcome(user)
5f84584 first commit
Dave Hoover authored
51
3315946 @redsquirrel Tweaking the README
authored
52 # Sent via good old ActionMailer
53 UserNotifier.deliver_reset(user)
5f84584 first commit
Dave Hoover authored
54
55
56 == REQUIREMENTS:
57
fb3b319 @redsquirrel Correcting name of mimi add-on
authored
58 * A Mad Mimi account with Mailer API enabled
5f84584 first commit
Dave Hoover authored
59 * ActionMailer
60
61
62 == INSTALL:
63
d732268 Releasing commits from Hashrocket for 0.0.7
Dave Hoover authored
64 * sudo gem install gemcutter
65 * gem tumble
5f84584 first commit
Dave Hoover authored
66 * sudo gem install mad_mimi_mailer
67
68
69 == LICENSE:
70
3315946 @redsquirrel Tweaking the README
authored
71 (The MIT License)
5f84584 first commit
Dave Hoover authored
72
3315946 @redsquirrel Tweaking the README
authored
73 Copyright (c) 2009 Dave Hoover, Obtiva Corporation
5f84584 first commit
Dave Hoover authored
74
3315946 @redsquirrel Tweaking the README
authored
75 Permission is hereby granted, free of charge, to any person obtaining
76 a copy of this software and associated documentation files (the
77 'Software'), to deal in the Software without restriction, including
78 without limitation the rights to use, copy, modify, merge, publish,
79 distribute, sublicense, and/or sell copies of the Software, and to
80 permit persons to whom the Software is furnished to do so, subject to
81 the following conditions:
5f84584 first commit
Dave Hoover authored
82
3315946 @redsquirrel Tweaking the README
authored
83 The above copyright notice and this permission notice shall be
84 included in all copies or substantial portions of the Software.
5f84584 first commit
Dave Hoover authored
85
3315946 @redsquirrel Tweaking the README
authored
86 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
87 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
88 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
89 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
90 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
91 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
92 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.