Updated docs and otherwise

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-09-02 19:32:45 +00:00
parent bf2bddd29f
commit 20bd4bd3e2
7 changed files with 46 additions and 10 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com]
* Tighten rescue clauses. #5985 [james@grayproductions.net]
* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH]

View File

@ -1,4 +1,4 @@
Copyright (c) 2004 David Heinemeier Hansson
Copyright (c) 2004-2006 David Heinemeier Hansson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -1,7 +1,7 @@
= Action Mailer -- Easy email delivery and testing
Action Mailer is a framework for designing email-service layers. These layers
are used to consolidate code for sending out forgotten passwords, welcoming
are used to consolidate code for sending out forgotten passwords, welcome
wishes on signup, invoices for billing, and any other use case that requires
a written notification to either a person or another system.

View File

@ -54,7 +54,7 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "actionmailer"
s.homepage = "http://www.rubyonrails.org"
s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
s.add_dependency('actionpack', '= 1.12.5' + PKG_BUILD)
s.has_rdoc = true
s.requirements << 'none'

View File

@ -27,7 +27,7 @@ unless defined?(ActionController)
require 'action_controller'
rescue LoadError
require 'rubygems'
require_gem 'actionpack', '>= 1.9.1'
require_gem 'actionpack', '>= 1.12.5'
end
end

View File

@ -7,7 +7,9 @@ require 'tmail/net'
module ActionMailer #:nodoc:
# ActionMailer allows you to send email from your application using a mailer model and views.
#
#
# = Mailer Models
#
# To use ActionMailer, you need to create a mailer model.
#
# $ script/generate mailer Notifier
@ -23,7 +25,7 @@ module ActionMailer #:nodoc:
# recipients recipient.email_address_with_name
# from "system@example.com"
# subject "New account information"
# body "account" => recipient
# body :account => recipient
# end
# end
#
@ -45,7 +47,9 @@ module ActionMailer #:nodoc:
# in an instance variable <tt>@account</tt> with the value of <tt>recipient</tt> being accessible in the
# view.
#
# = Mailer Views
#
# = Mailer views
#
# Like ActionController, each mailer class has a corresponding view directory
# in which each method of the class looks for a template with its name.
# To define a template to be used with a mailing, create an <tt>.rhtml</tt> file with the same name as the method
@ -59,7 +63,30 @@ module ActionMailer #:nodoc:
# Hi <%= @account.name %>,
# Thanks for joining our service! Please check back often.
#
# = Sending Mail
# You can even use Action Pack helpers in these views. For example:
#
# You got a new note!
# <%= truncate(note.body, 25) %>
#
#
# = Generating URLs for mailer views
#
# If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view.
# Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's
# why you need to jump this little hoop and supply all the details needed for the URL. Example:
#
# def signup_notification(recipient)
# recipients recipient.email_address_with_name
# from "system@example.com"
# subject "New account information"
# body :account => recipient,
# :home_page => url_for(:host => "example.com", :controller => "welcome", :action => "greeting")
# end
#
# You can now access @home_page in the template and get http://example.com/welcome/greeting.
#
# = Sending mail
#
# Once a mailer action and template are defined, you can deliver your message or create it and save it
# for delivery later:
#
@ -73,7 +100,9 @@ module ActionMailer #:nodoc:
# like to deliver. The <tt>signup_notification</tt> method defined above is
# delivered by invoking <tt>Notifier.deliver_signup_notification</tt>.
#
# = HTML Email
#
# = HTML email
#
# To send mail as HTML, make sure your view (the <tt>.rhtml</tt> file) generates HTML and
# set the content type to html.
#
@ -87,7 +116,9 @@ module ActionMailer #:nodoc:
# end
# end
#
# = Multipart Email
#
# = Multipart email
#
# You can explicitly specify multipart messages:
#
# class ApplicationMailer < ActionMailer::Base
@ -120,7 +151,9 @@ module ActionMailer #:nodoc:
# with the corresponding content type. The same body hash is passed to
# each template.
#
#
# = Attachments
#
# Attachments can be added by using the +attachment+ method.
#
# Example:
@ -141,6 +174,7 @@ module ActionMailer #:nodoc:
# end
# end
#
#
# = Configuration options
#
# These options are specified on the class level, like <tt>ActionMailer::Base.template_root = "/my/templates"</tt>

View File

@ -2,7 +2,7 @@ module ActionMailer
module VERSION #:nodoc:
MAJOR = 1
MINOR = 2
TINY = 1
TINY = 5
STRING = [MAJOR, MINOR, TINY].join('.')
end