facade.rb
- []
- []=
- accept
- add_date
- add_hf
- add_message_id
- addrs2specs
- attachment?
- attachments
- base64_decode
- base64_encode
- bcc
- bcc=
- bcc_addrs
- bcc_addrs=
- body
- body=
- body_port
- boundary
- canonical
- cc
- cc=
- cc_addrs
- cc_addrs=
- charset
- charset=
- clear
- content_disposition
- content_disposition=
- content_transfer_encoding
- content_transfer_encoding=
- content_type
- content_type=
- create_empty_mail
- create_forward
- create_reply
- create_reply
- date
- date=
- delete
- delete_if
- delete_no_send_fields
- destinations
- disposition
- disposition=
- disposition_param
- do_send_to
- each
- each_dest
- each_dest
- each_destination
- each_field
- each_header
- each_header_name
- each_key
- each_pair
- each_part
- each_value
- encoding
- encoding=
- epilogue
- epilogue=
- error_reply_addresses
- fetch
- friendly_from
- from
- from=
- from_addr
- from_address
- from_address=
- from_addrs
- from_addrs=
- from_phrase
- has_attachments?
- has_key?
- has_value?
- header
- header_string
- in_reply_to
- in_reply_to=
- include?
- indexes
- indices
- inspect
- key?
- keys
- load
- main_type
- message_id
- message_id=
- mime_encode
- mime_encode_binary
- mime_encode_multipart
- mime_encode_singlepart
- mime_encode_text
- mime_version
- mime_version=
- msgid
- msgid
- msgid=
- multipart?
- new
- new_hf
- ordered_each
- parse
- parse_body
- parse_body_0
- parse_header
- parts
- preamble=
- quoted_body
- quoted_subject
- read_multipart
- ready_to_send
- references
- references=
- reply_addresses
- reply_to
- reply_to=
- reply_to_addrs
- reply_to_addrs=
- send_text_to
- send_to
- send_to_0
- sender
- sender=
- sender_addr
- sender_addr=
- set_addrfield
- set_content_disposition
- set_content_type
- set_disposition
- set_string_array_attr
- set_string_attr
- setup_forward
- setup_reply
- skip_header
- store
- strftime
- sub_header
- sub_type
- subject
- subject
- subject=
- to
- to=
- to_addrs
- to_addrs=
- transfer_encoding
- transfer_encoding=
- type_param
- unquoted_body
- value?
- values
- values_at
- with_multipart_encoding
- write_back
| ALLOW_MULTIPLE | = | { 'received' => true, 'resent-date' => true, 'resent-from' => true, 'resent-sender' => true, 'resent-to' => true, 'resent-cc' => true, 'resent-bcc' => true, 'resent-message-id' => true, 'comments' => true, 'keywords' => true |
| header | ||
| USE_ARRAY | = | ALLOW_MULTIPLE |
| FIELD_ORDER | = | %w( return-path received resent-date resent-from resent-sender resent-to resent-cc resent-bcc resent-message-id date from sender reply-to to cc bcc message-id in-reply-to references subject comments keywords mime-version content-type content-transfer-encoding content-disposition content-description ) |
| NOSEND_FIELDS | = | %w( received bcc ) |
| [R] | port |
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 127
127: def Mail.boundary
128: ::TMail.new_boundary
129: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 46
46: def load( fname )
47: new(FilePort.new(fname))
48: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 131
131: def Mail.msgid
132: ::TMail.new_message_id
133: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 58
58: def initialize( port = nil, conf = DEFAULT_CONFIG )
59: @port = port || StringPort.new
60: @config = Config.to_config(conf)
61:
62: @header = {}
63: @body_port = nil
64: @body_parsed = false
65: @epilogue = ''
66: @parts = []
67:
68: @port.ropen {|f|
69: parse_header f
70: parse_body f unless @port.reproducible?
71: }
72: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 53
53: def parse( str )
54: new(StringPort.new(str))
55: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 163
163: def []( key )
164: @header[key.downcase]
165: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 173
173: def []=( key, val )
174: dkey = key.downcase
175:
176: if val.nil?
177: @header.delete dkey
178: return nil
179: end
180:
181: case val
182: when String
183: header = new_hf(key, val)
184: when HeaderField
185: ;
186: when Array
187: ALLOW_MULTIPLE.include? dkey or
188: raise ArgumentError, "#{key}: Header must not be multiple"
189: @header[dkey] = val
190: return val
191: else
192: header = new_hf(key, val.to_s)
193: end
194: if ALLOW_MULTIPLE.include? dkey
195: (@header[dkey] ||= []).push header
196: else
197: @header[dkey] = header
198: end
199:
200: val
201: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 93
93: def accept( strategy )
94: with_multipart_encoding(strategy) {
95: ordered_each do |name, field|
96: next if field.empty?
97: strategy.header_name canonical(name)
98: field.accept strategy
99: strategy.puts
100: end
101: strategy.puts
102: body_port().ropen {|r|
103: strategy.write r.read
104: }
105: }
106: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 86
86: def add_date
87: self.date = Time.now
88: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 82
82: def add_message_id( fqdn = nil )
83: self.message_id = ::TMail::new_message_id(fqdn)
84: end
[ show source ]
# File lib/action_mailer/vendor/tmail/attachments.rb, line 13
13: def attachment?(part)
14: (part['content-disposition'] && part['content-disposition'].disposition == "attachment") ||
15: part.header['content-type'].main_type != "text"
16: end
[ show source ]
# File lib/action_mailer/vendor/tmail/attachments.rb, line 18
18: def attachments
19: if multipart?
20: parts.collect { |part|
21: if attachment?(part)
22: content = part.body # unquoted automatically by TMail#body
23: file_name = (part['content-location'] &&
24: part['content-location'].body) ||
25: part.sub_header("content-type", "name") ||
26: part.sub_header("content-disposition", "filename")
27:
28: next if file_name.blank? || content.blank?
29:
30: attachment = Attachment.new(content)
31: attachment.original_filename = file_name.strip
32: attachment.content_type = part.content_type
33: attachment
34: end
35: }.compact
36: end
37: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 502
502: def base64_decode
503: if /base64/i === self.transfer_encoding('')
504: store 'Content-Transfer-Encoding', '8bit'
505: self.body = Base64.decode(self.body, @config.strict_base64decode?)
506: end
507: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 497
497: def base64_encode
498: store 'Content-Transfer-Encoding', 'Base64'
499: self.body = Base64.folding_encode(self.body)
500: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 173
173: def bcc( default = nil )
174: addrs2specs(bcc_addrs(nil)) || default
175: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 185
185: def bcc=( *strs )
186: set_string_array_attr 'Bcc', strs
187: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 145
145: def bcc_addrs( default = nil )
146: if h = @header['bcc']
147: h.addrs
148: else
149: default
150: end
151: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 161
161: def bcc_addrs=( arg )
162: set_addrfield 'bcc', arg
163: end
[ show source ]
# File lib/action_mailer/vendor/tmail/quoting.rb, line 25
25: def body(to_charset = 'utf-8', &block)
26: attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" }
27:
28: if multipart?
29: parts.collect { |part|
30: header = part["content-type"]
31:
32: if part.multipart?
33: part.body(to_charset, &attachment_presenter)
34: elsif header.nil?
35: ""
36: elsif !attachment?(part)
37: part.unquoted_body(to_charset)
38: else
39: attachment_presenter.call(header["name"] || "(unnamed)")
40: end
41: }.join
42: else
43: unquoted_body(to_charset)
44: end
45: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 357
357: def body=( str )
358: parse_body
359: @body_port.wopen {|f| f.write str }
360: str
361: end
body
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 341
341: def body_port
342: parse_body
343: @body_port
344: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 169
169: def cc( default = nil )
170: addrs2specs(cc_addrs(nil)) || default
171: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 181
181: def cc=( *strs )
182: set_string_array_attr 'Cc', strs
183: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 137
137: def cc_addrs( default = nil )
138: if h = @header['cc']
139: h.addrs
140: else
141: default
142: end
143: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 157
157: def cc_addrs=( arg )
158: set_addrfield 'cc', arg
159: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 411
411: def charset( default = nil )
412: if h = @header['content-type']
413: h['charset'] or default
414: else
415: default
416: end
417: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 419
419: def charset=( str )
420: if str
421: if h = @header[ 'content-type' ]
422: h['charset'] = str
423: else
424: store 'Content-Type', "text/plain; charset=#{str}"
425: end
426: end
427: str
428: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 248
248: def clear
249: @header.clear
250: end
Alias for disposition
Alias for set_disposition
Alias for transfer_encoding
Alias for transfer_encoding=
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 358
358: def content_type( default = nil )
359: if h = @header['content-type']
360: h.content_type || default
361: else
362: default
363: end
364: end
Alias for set_content_type
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 130
130: def create_empty_mail
131: self.class.new(StringPort.new(''), @config)
132: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 153
153: def create_forward
154: setup_forward create_empty_mail()
155: end
utils
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 486
486: def create_reply
487: mail = TMail::Mail.parse('')
488: mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '')
489: mail.to_addrs = reply_addresses([])
490: mail.in_reply_to = [message_id(nil)].compact
491: mail.references = references([]) + [message_id(nil)].compact
492: mail.mime_version = '1.0'
493: mail
494: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 134
134: def create_reply
135: setup_reply create_empty_mail()
136: end
date time
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 99
99: def date( default = nil )
100: if h = @header['date']
101: h.date
102: else
103: default
104: end
105: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 107
107: def date=( time )
108: if time
109: store 'Date', time2str(time)
110: else
111: @header.delete 'date'
112: end
113: time
114: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 252
252: def delete( key )
253: @header.delete key.downcase
254: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 256
256: def delete_if
257: @header.delete_if do |key,val|
258: if Array === val
259: val.delete_if {|v| yield key, v }
260: val.empty?
261: else
262: yield key, val
263: end
264: end
265: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 75
75: def delete_no_send_fields
76: NOSEND_FIELDS.each do |nm|
77: delete nm
78: end
79: delete_if {|n,v| v.empty? }
80: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 510
510: def destinations( default = nil )
511: ret = []
512: %w( to cc bcc ).each do |nm|
513: if h = @header[nm]
514: h.addrs.each {|i| ret.push i.address }
515: end
516: end
517: ret.empty? ? default : ret
518: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 449
449: def disposition( default = nil )
450: if h = @header['content-disposition']
451: h.disposition || default
452: else
453: default
454: end
455: end
Alias for set_disposition
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 474
474: def disposition_param( name, default = nil )
475: if h = @header['content-disposition']
476: h[name] || default
477: else
478: default
479: end
480: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 346
346: def each( &block )
347: body_port().ropen {|f| f.each(&block) }
348: end
Alias for each_destination
Alias for each_destination
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 520
520: def each_destination( &block )
521: destinations([]).each do |i|
522: if Address === i
523: yield i
524: else
525: i.each(&block)
526: end
527: end
528: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 219
219: def each_field( &block )
220: @header.values.flatten.each(&block)
221: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 205
205: def each_header
206: @header.each do |key, val|
207: [val].flatten.each {|v| yield key, v }
208: end
209: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 213
213: def each_header_name( &block )
214: @header.each_key(&block)
215: end
Alias for each_header_name
Alias for each_header
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 382
382: def each_part( &block )
383: parts().each(&block)
384: end
Alias for each_field
Alias for transfer_encoding
Alias for transfer_encoding=
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 366
366: def epilogue
367: parse_body
368: @epilogue.dup
369: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 371
371: def epilogue=( str )
372: parse_body
373: @epilogue = str
374: str
375: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 537
537: def error_reply_addresses( default = nil )
538: if s = sender(nil)
539: [s]
540: else
541: from_addrs(default)
542: end
543: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 214
214: def friendly_from( default = nil )
215: h = @header['from']
216: a, = h.addrs
217: return default unless a
218: return a.phrase if a.phrase
219: return h.comments.join(' ') unless h.comments.empty?
220: a.spec
221: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 206
206: def from( default = nil )
207: addrs2specs(from_addrs(nil)) || default
208: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 210
210: def from=( *strs )
211: set_string_array_attr 'From', strs
212: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 55
55: def from_addr( default = nil )
56: addr, = from_addrs(nil)
57: addr || default
58: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 60
60: def from_address( default = nil )
61: if a = from_addr(nil)
62: a.spec
63: else
64: default
65: end
66: end
Alias for from_addrs=
originator
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 194
194: def from_addrs( default = nil )
195: if h = @header['from']
196: h.addrs
197: else
198: default
199: end
200: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 202
202: def from_addrs=( arg )
203: set_addrfield 'from', arg
204: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 70
70: def from_phrase( default = nil )
71: if a = from_addr(nil)
72: a.phrase
73: else
74: default
75: end
76: end
[ show source ]
# File lib/action_mailer/vendor/tmail/attachments.rb, line 9
9: def has_attachments?
10: multipart? && parts.any? { |part| attachment?(part) }
11: end
Alias for key?
Alias for value?
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 159
159: def header
160: @header.dup
161: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 37
37: def header_string( name, default = nil )
38: h = @header[name.downcase] or return default
39: h.to_s
40: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 306
306: def in_reply_to( default = nil )
307: if h = @header['in-reply-to']
308: h.ids
309: else
310: default
311: end
312: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 314
314: def in_reply_to=( *idstrs )
315: set_string_array_attr 'In-Reply-To', idstrs
316: end
Alias for key?
Alias for values_at
Alias for values_at
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 76
76: def inspect
77: "\#<#{self.class} port=#{@port.inspect} bodyport=#{@body_port.inspect}>"
78: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 271
271: def key?( key )
272: @header.key? key.downcase
273: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 267
267: def keys
268: @header.keys
269: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 366
366: def main_type( default = nil )
367: if h = @header['content-type']
368: h.main_type || default
369: else
370: default
371: end
372: end
identity & threading
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 294
294: def message_id( default = nil )
295: if h = @header['message-id']
296: h.id || default
297: else
298: default
299: end
300: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 302
302: def message_id=( str )
303: set_string_attr 'Message-Id', str
304: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 90
90: def mime_encode
91: if parts.empty?
92: mime_encode_singlepart
93: else
94: mime_encode_multipart true
95: end
96: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 114
114: def mime_encode_binary( body )
115: self.body = [body].pack('m')
116: self.set_content_type 'application', 'octet-stream'
117: self.encoding = 'Base64'
118: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 120
120: def mime_encode_multipart( top = true )
121: self.mime_version = '1.0' if top
122: self.set_content_type 'multipart', 'mixed'
123: e = encoding(nil)
124: if e and not /\A(?:7bit|8bit|binary)\z/i === e
125: raise ArgumentError,
126: 'using C.T.Encoding with multipart mail is not permitted'
127: end
128: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 98
98: def mime_encode_singlepart
99: self.mime_version = '1.0'
100: b = body
101: if NKF.guess(b) != NKF::BINARY
102: mime_encode_text b
103: else
104: mime_encode_binary b
105: end
106: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 108
108: def mime_encode_text( body )
109: self.body = NKF.nkf('-j -m0', body)
110: self.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'}
111: self.encoding = '7bit'
112: end
MIME headers
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 335
335: def mime_version( default = nil )
336: if h = @header['mime-version']
337: h.version || default
338: else
339: default
340: end
341: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 343
343: def mime_version=( m, opt = nil )
344: if opt
345: if h = @header['mime-version']
346: h.major = m
347: h.minor = opt
348: else
349: store 'Mime-Version', "#{m}.#{opt}"
350: end
351: else
352: store 'Mime-Version', m
353: end
354: m
355: end
Alias for message_id
Alias for message_id=
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 546
546: def multipart?
547: main_type('').downcase == 'multipart'
548: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 236
236: def ordered_each
237: list = @header.keys
238: FIELD_ORDER.each do |name|
239: if list.delete(name)
240: [@header[name]].flatten.each {|v| yield name, v }
241: end
242: end
243: list.each do |name|
244: [@header[name]].flatten.each {|v| yield name, v }
245: end
246: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 377
377: def parts
378: parse_body
379: @parts
380: end
Alias for body=
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 350
350: def quoted_body
351: parse_body
352: @body_port.ropen {|f|
353: return f.read
354: }
355: end
Alias for subject
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 64
64: def ready_to_send
65: delete_no_send_fields
66: add_message_id
67: add_date
68: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 318
318: def references( default = nil )
319: if h = @header['references']
320: h.refs
321: else
322: default
323: end
324: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 326
326: def references=( *strs )
327: set_string_array_attr 'References', strs
328: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 533
533: def reply_addresses( default = nil )
534: reply_to_addrs(nil) or from_addrs(nil) or default
535: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 236
236: def reply_to( default = nil )
237: addrs2specs(reply_to_addrs(nil)) || default
238: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 240
240: def reply_to=( *strs )
241: set_string_array_attr 'Reply-To', strs
242: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 224
224: def reply_to_addrs( default = nil )
225: if h = @header['reply-to']
226: h.addrs
227: else
228: default
229: end
230: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 232
232: def reply_to_addrs=( arg )
233: set_addrfield 'reply-to', arg
234: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 43
43: def send_text_to( smtp )
44: do_send_to(smtp) do
45: ready_to_send
46: mime_encode
47: end
48: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 37
37: def send_to( smtp )
38: do_send_to(smtp) do
39: ready_to_send
40: end
41: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 58
58: def send_to_0( smtp, from, to )
59: smtp.ready(from, to) do |f|
60: encoded "\r\n", 'j', f, ''
61: end
62: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 261
261: def sender( default )
262: f = @header['sender'] or return default
263: a = f.addr or return default
264: a.spec
265: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 267
267: def sender=( str )
268: set_string_attr 'Sender', str
269: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 245
245: def sender_addr( default = nil )
246: f = @header['sender'] or return default
247: f.addr or return default
248: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 250
250: def sender_addr=( addr )
251: if addr
252: h = HeaderField.internal_new('sender', @config)
253: h.addr = addr
254: @header['sender'] = h
255: else
256: @header.delete 'sender'
257: end
258: addr
259: end
Alias for set_disposition
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 382
382: def set_content_type( str, sub = nil, param = nil )
383: if sub
384: main, sub = str, sub
385: else
386: main, sub