Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
daad4454
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
daad4454
编写于
7月 28, 2010
作者:
N
Neeraj Singh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
itsy bitsy changes to ActionMailer documentation
上级
2df36552
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
14 deletion
+11
-14
actionmailer/lib/action_mailer/base.rb
actionmailer/lib/action_mailer/base.rb
+11
-14
未找到文件。
actionmailer/lib/action_mailer/base.rb
浏览文件 @
daad4454
...
...
@@ -41,16 +41,16 @@ module ActionMailer #:nodoc:
# in the same manner as <tt>attachments[]=</tt>
#
# * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
# as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields
(
like <tt>To:</tt>
# as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields like <tt>To:</tt>
# <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
# can appear multiple times. If you want to change a field that can appear multiple times,
# you need to set it to nil first so that Mail knows you are replacing it
,
not adding
# another field of the same name.
)
# you need to set it to nil first so that Mail knows you are replacing it
and
not adding
# another field of the same name.
#
# * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
# as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'})</tt>
#
# * <tt>mail</tt> - Allows you to specify
your email to send
.
# * <tt>mail</tt> - Allows you to specify
email to be sent
.
#
# The hash passed to the mail method allows you to specify any header that a Mail::Message
# will accept (any valid Email header including optional fields).
...
...
@@ -66,7 +66,7 @@ module ActionMailer #:nodoc:
# format.html
# end
#
# The block syntax is
useful if also need to specify
information specific to a part:
# The block syntax is
also useful in providing
information specific to a part:
#
# mail(:to => user.email) do |format|
# format.text(:content_transfer_encoding => "base64")
...
...
@@ -121,7 +121,7 @@ module ActionMailer #:nodoc:
#
# <%= users_url(:host => "example.com") %>
#
# You w
ill w
ant to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
# You want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
# make sense to generate relative URLs in email messages.
#
# It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
...
...
@@ -132,7 +132,7 @@ module ActionMailer #:nodoc:
# Setting <tt>ActionMailer::Base.default_url_options</tt> directly is now deprecated, use the configuration
# option mentioned above to set the default host.
#
# If you do decide to set a default <tt>:host</tt> for your mailers you w
ill w
ant to use the
# If you do decide to set a default <tt>:host</tt> for your mailers you want to use the
# <tt>:only_path => false</tt> option when using <tt>url_for</tt>. This will ensure that absolute URLs are
# generated because the <tt>url_for</tt> view helper will, by default, generate relative URLs when a
# <tt>:host</tt> option isn't explicitly provided.
...
...
@@ -154,7 +154,7 @@ module ActionMailer #:nodoc:
# detect and use multipart templates, where each template is named after the name of the action, followed
# by the content type. Each such detected template will be added as separate part to the message.
#
# For example, if the following templates exist
ed
:
# For example, if the following templates exist:
# * signup_notification.text.plain.erb
# * signup_notification.text.html.erb
# * signup_notification.text.xml.builder
...
...
@@ -171,8 +171,7 @@ module ActionMailer #:nodoc:
#
# = Attachments
#
# You can see above how to make a multipart HTML / Text email, to send attachments is just
# as easy:
# Sending attachment in emails is easy:
#
# class ApplicationMailer < ActionMailer::Base
# def welcome(recipient)
...
...
@@ -189,10 +188,8 @@ module ActionMailer #:nodoc:
#
# = Inline Attachments
#
# You can also specify that a file should be displayed inline with other HTML. For example a
# corporate logo or a photo or the like.
#
# To do this is simple, in the Mailer:
# You can also specify that a file should be displayed inline with other HTML. This is useful
# if you want to display a corporate logo or a photo.
#
# class ApplicationMailer < ActionMailer::Base
# def welcome(recipient)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录