Changeset 4902
- Timestamp:
- 09/02/06 19:32:45 (2 years ago)
- Files:
-
- trunk/actionmailer/CHANGELOG (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer.rb (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/base.rb (modified) (8 diffs)
- trunk/actionmailer/lib/action_mailer/version.rb (modified) (1 diff)
- trunk/actionmailer/MIT-LICENSE (modified) (1 diff)
- trunk/actionmailer/Rakefile (modified) (1 diff)
- trunk/actionmailer/README (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/CHANGELOG
r4885 r4902 1 1 *SVN* 2 3 * Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com] 2 4 3 5 * Tighten rescue clauses. #5985 [james@grayproductions.net] trunk/actionmailer/lib/action_mailer.rb
r4481 r4902 28 28 rescue LoadError 29 29 require 'rubygems' 30 require_gem 'actionpack', '>= 1. 9.1'30 require_gem 'actionpack', '>= 1.12.5' 31 31 end 32 32 end trunk/actionmailer/lib/action_mailer/base.rb
r4885 r4902 8 8 # ActionMailer allows you to send email from your application using a mailer model and views. 9 9 # 10 # 10 11 # = Mailer Models 12 # 11 13 # To use ActionMailer, you need to create a mailer model. 12 14 # … … 24 26 # from "system@example.com" 25 27 # subject "New account information" 26 # body "account"=> recipient28 # body :account => recipient 27 29 # end 28 30 # end … … 46 48 # view. 47 49 # 48 # = Mailer Views 50 # 51 # = Mailer views 52 # 49 53 # Like ActionController, each mailer class has a corresponding view directory 50 54 # in which each method of the class looks for a template with its name. … … 60 64 # Thanks for joining our service! Please check back often. 61 65 # 62 # = Sending Mail 66 # You can even use Action Pack helpers in these views. For example: 67 # 68 # You got a new note! 69 # <%= truncate(note.body, 25) %> 70 # 71 # 72 # = Generating URLs for mailer views 73 # 74 # If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view. 75 # Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's 76 # why you need to jump this little hoop and supply all the details needed for the URL. Example: 77 # 78 # def signup_notification(recipient) 79 # recipients recipient.email_address_with_name 80 # from "system@example.com" 81 # subject "New account information" 82 # body :account => recipient, 83 # :home_page => url_for(:host => "example.com", :controller => "welcome", :action => "greeting") 84 # end 85 # 86 # You can now access @home_page in the template and get http://example.com/welcome/greeting. 87 # 88 # = Sending mail 89 # 63 90 # Once a mailer action and template are defined, you can deliver your message or create it and save it 64 91 # for delivery later: … … 74 101 # delivered by invoking <tt>Notifier.deliver_signup_notification</tt>. 75 102 # 76 # = HTML Email 103 # 104 # = HTML email 105 # 77 106 # To send mail as HTML, make sure your view (the <tt>.rhtml</tt> file) generates HTML and 78 107 # set the content type to html. … … 88 117 # end 89 118 # 90 # = Multipart Email 119 # 120 # = Multipart email 121 # 91 122 # You can explicitly specify multipart messages: 92 123 # … … 121 152 # each template. 122 153 # 154 # 123 155 # = Attachments 156 # 124 157 # Attachments can be added by using the +attachment+ method. 125 158 # … … 141 174 # end 142 175 # end 176 # 143 177 # 144 178 # = Configuration options trunk/actionmailer/lib/action_mailer/version.rb
r4183 r4902 3 3 MAJOR = 1 4 4 MINOR = 2 5 TINY = 15 TINY = 5 6 6 7 7 STRING = [MAJOR, MINOR, TINY].join('.') trunk/actionmailer/MIT-LICENSE
r4 r4902 1 Copyright (c) 2004 David Heinemeier Hansson1 Copyright (c) 2004-2006 David Heinemeier Hansson 2 2 3 3 Permission is hereby granted, free of charge, to any person obtaining trunk/actionmailer/Rakefile
r4204 r4902 55 55 s.homepage = "http://www.rubyonrails.org" 56 56 57 s.add_dependency('actionpack', '= 1.12. 1' + PKG_BUILD)57 s.add_dependency('actionpack', '= 1.12.5' + PKG_BUILD) 58 58 59 59 s.has_rdoc = true trunk/actionmailer/README
r2743 r4902 2 2 3 3 Action Mailer is a framework for designing email-service layers. These layers 4 are used to consolidate code for sending out forgotten passwords, welcom ing4 are used to consolidate code for sending out forgotten passwords, welcome 5 5 wishes on signup, invoices for billing, and any other use case that requires 6 6 a written notification to either a person or another system.