facade.rb
- []
- []=
- accept
- add_date
- add_hf
- add_message_id
- addrs2specs
- 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_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
- preamble=
- 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_type
- subject
- subject=
- to
- to=
- to_addrs
- to_addrs=
- transfer_encoding
- transfer_encoding=
- type_param
- 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 108
108: def Mail.boundary
109: ::TMail.new_boundary
110: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 25
25: def load( fname )
26: new(FilePort.new(fname))
27: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 112
112: def Mail.msgid
113: ::TMail.new_message_id
114: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 37
37: def initialize( port = nil, conf = DEFAULT_CONFIG )
38: @port = port || StringPort.new
39: @config = Config.to_config(conf)
40:
41: @header = {}
42: @body_port = nil
43: @body_parsed = false
44: @epilogue = ''
45: @parts = []
46:
47: @port.ropen {|f|
48: parse_header f
49: parse_body f unless @port.reproducible?
50: }
51: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 32
32: def parse( str )
33: new(StringPort.new(str))
34: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 142
142: def []( key )
143: @header[key.downcase]
144: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 148
148: def []=( key, val )
149: dkey = key.downcase
150:
151: if val.nil?
152: @header.delete dkey
153: return nil
154: end
155:
156: case val
157: when String
158: header = new_hf(key, val)
159: when HeaderField
160: ;
161: when Array
162: ALLOW_MULTIPLE.include? dkey or
163: raise ArgumentError, "#{key}: Header must not be multiple"
164: @header[dkey] = val
165: return val
166: else
167: header = new_hf(key, val.to_s)
168: end
169: if ALLOW_MULTIPLE.include? dkey
170: (@header[dkey] ||= []).push header
171: else
172: @header[dkey] = header
173: end
174:
175: val
176: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 72
72: def accept( strategy )
73: with_multipart_encoding(strategy) {
74: ordered_each do |name, field|
75: next if field.empty?
76: strategy.header_name canonical(name)
77: field.accept strategy
78: strategy.puts
79: end
80: strategy.puts
81: body_port().ropen {|r|
82: strategy.write r.read
83: }
84: }
85: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 67
67: def add_date
68: self.date = Time.now
69: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 63
63: def add_message_id( fqdn = nil )
64: self.message_id = ::TMail::new_msgid(fqdn)
65: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 481
481: def base64_decode
482: if /base64/i === self.transfer_encoding('')
483: store 'Content-Transfer-Encoding', '8bit'
484: self.body = Base64.decode(self.body, @config.strict_base64decode?)
485: end
486: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 476
476: def base64_encode
477: store 'Content-Transfer-Encoding', 'Base64'
478: self.body = Base64.folding_encode(self.body)
479: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 154
154: def bcc( default = nil )
155: addrs2specs(bcc_addrs(nil)) || default
156: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 166
166: def bcc=( *strs )
167: set_string_array_attr 'Bcc', strs
168: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 126
126: def bcc_addrs( default = nil )
127: if h = @header['bcc']
128: h.addrs
129: else
130: default
131: end
132: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 142
142: def bcc_addrs=( arg )
143: set_addrfield 'bcc', arg
144: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 323
323: def body
324: parse_body
325: @body_port.ropen {|f|
326: return f.read
327: }
328: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 330
330: def body=( str )
331: parse_body
332: @body_port.wopen {|f| f.write str }
333: str
334: end
body
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 314
314: def body_port
315: parse_body
316: @body_port
317: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 150
150: def cc( default = nil )
151: addrs2specs(cc_addrs(nil)) || default
152: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 162
162: def cc=( *strs )
163: set_string_array_attr 'Cc', strs
164: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 118
118: def cc_addrs( default = nil )
119: if h = @header['cc']
120: h.addrs
121: else
122: default
123: end
124: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 138
138: def cc_addrs=( arg )
139: set_addrfield 'cc', arg
140: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 391
391: def charset( default = nil )
392: if h = @header['content-type']
393: h['charset'] or default
394: else
395: default
396: end
397: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 399
399: def charset=( str )
400: if str
401: if h = @header[ 'content-type' ]
402: h['charset'] = str
403: else
404: store 'Content-Type', "text/plain; charset=#{str}"
405: end
406: end
407: str
408: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 223
223: def clear
224: @header.clear
225: 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 338
338: def content_type( default = nil )
339: if h = @header['content-type']
340: h.content_type || default
341: else
342: default
343: end
344: end
Alias for set_content_type
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 111
111: def create_empty_mail
112: self.class.new(StringPort.new(''), @config)
113: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 134
134: def create_forward
135: setup_forward create_empty_mail()
136: end
utils
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 465
465: def create_reply
466: mail = TMail::Mail.parse('')
467: mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '')
468: mail.to_addrs = reply_addresses([])
469: mail.in_reply_to = [message_id(nil)].compact
470: mail.references = references([]) + [message_id(nil)].compact
471: mail.mime_version = '1.0'
472: mail
473: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 115
115: def create_reply
116: setup_reply create_empty_mail()
117: end
date time
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 80
80: def date( default = nil )
81: if h = @header['date']
82: h.date
83: else
84: default
85: end
86: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 88
88: def date=( time )
89: if time
90: store 'Date', time2str(time)
91: else
92: @header.delete 'date'
93: end
94: time
95: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 227
227: def delete( key )
228: @header.delete key.downcase
229: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 231
231: def delete_if
232: @header.delete_if do |key,val|
233: if Array === val
234: val.delete_if {|v| yield key, v }
235: val.empty?
236: else
237: yield key, val
238: end
239: end
240: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 56
56: def delete_no_send_fields
57: NOSEND_FIELDS.each do |nm|
58: delete nm
59: end
60: delete_if {|n,v| v.empty? }
61: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 489
489: def destinations( default = nil )
490: ret = []
491: %w( to cc bcc ).each do |nm|
492: if h = @header[nm]
493: h.addrs.each {|i| ret.push i.address }
494: end
495: end
496: ret.empty? ? default : ret
497: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 429
429: def disposition( default = nil )
430: if h = @header['content-disposition']
431: h.disposition || default
432: else
433: default
434: end
435: end
Alias for set_disposition
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 453
453: def disposition_param( name, default = nil )
454: if h = @header['content-disposition']
455: h[name] || default
456: else
457: default
458: end
459: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 319
319: def each( &block )
320: body_port().ropen {|f| f.each(&block) }
321: end
Alias for each_destination
Alias for each_destination
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 499
499: def each_destination( &block )
500: destinations([]).each do |i|
501: if Address === i
502: yield i
503: else
504: i.each(&block)
505: end
506: end
507: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 194
194: def each_field( &block )
195: @header.values.flatten.each(&block)
196: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 180
180: def each_header
181: @header.each do |key, val|
182: [val].flatten.each {|v| yield key, v }
183: end
184: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 188
188: def each_header_name( &block )
189: @header.each_key(&block)
190: end
Alias for each_header_name
Alias for each_header
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 355
355: def each_part( &block )
356: parts().each(&block)
357: end
Alias for each_field
Alias for transfer_encoding
Alias for transfer_encoding=
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 339
339: def epilogue
340: parse_body
341: @epilogue.dup
342: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 344
344: def epilogue=( str )
345: parse_body
346: @epilogue = str
347: str
348: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 516
516: def error_reply_addresses( default = nil )
517: if s = sender(nil)
518: [s]
519: else
520: from_addrs(default)
521: end
522: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 195
195: def friendly_from( default = nil )
196: h = @header['from']
197: a, = h.addrs
198: return default unless a
199: return a.phrase if a.phrase
200: return h.comments.join(' ') unless h.comments.empty?
201: a.spec
202: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 187
187: def from( default = nil )
188: addrs2specs(from_addrs(nil)) || default
189: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 191
191: def from=( *strs )
192: set_string_array_attr 'From', strs
193: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 36
36: def from_addr( default = nil )
37: addr, = from_addrs(nil)
38: addr || default
39: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 41
41: def from_address( default = nil )
42: if a = from_addr(nil)
43: a.spec
44: else
45: default
46: end
47: end
Alias for from_addrs=
originator
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 175
175: def from_addrs( default = nil )
176: if h = @header['from']
177: h.addrs
178: else
179: default
180: end
181: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 183
183: def from_addrs=( arg )
184: set_addrfield 'from', arg
185: end
[ show source ]
# File lib/action_mailer/vendor/tmail/obsolete.rb, line 51
51: def from_phrase( default = nil )
52: if a = from_addr(nil)
53: a.phrase
54: else
55: default
56: end
57: end
Alias for key?
Alias for value?
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 138
138: def header
139: @header.dup
140: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 18
18: def header_string( name, default = nil )
19: h = @header[name.downcase] or return default
20: h.to_s
21: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 286
286: def in_reply_to( default = nil )
287: if h = @header['in-reply-to']
288: h.ids
289: else
290: default
291: end
292: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 294
294: def in_reply_to=( *idstrs )
295: set_string_array_attr 'In-Reply-To', idstrs
296: end
Alias for key?
Alias for values_at
Alias for values_at
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 55
55: def inspect
56: "\#<#{self.class} port=#{@port.inspect} bodyport=#{@body_port.inspect}>"
57: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 246
246: def key?( key )
247: @header.key? key.downcase
248: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 242
242: def keys
243: @header.keys
244: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 346
346: def main_type( default = nil )
347: if h = @header['content-type']
348: h.main_type || default
349: else
350: default
351: end
352: end
identity & threading
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 274
274: def message_id( default = nil )
275: if h = @header['message-id']
276: h.id || default
277: else
278: default
279: end
280: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 282
282: def message_id=( str )
283: set_string_attr 'Message-Id', str
284: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 71
71: def mime_encode
72: if parts.empty?
73: mime_encode_singlepart
74: else
75: mime_encode_multipart true
76: end
77: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 95
95: def mime_encode_binary( body )
96: self.body = [body].pack('m')
97: self.set_content_type 'application', 'octet-stream'
98: self.encoding = 'Base64'
99: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 101
101: def mime_encode_multipart( top = true )
102: self.mime_version = '1.0' if top
103: self.set_content_type 'multipart', 'mixed'
104: e = encoding(nil)
105: if e and not /\A(?:7bit|8bit|binary)\z/i === e
106: raise ArgumentError,
107: 'using C.T.Encoding with multipart mail is not permitted'
108: end
109: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 79
79: def mime_encode_singlepart
80: self.mime_version = '1.0'
81: b = body
82: if NKF.guess(b) != NKF::BINARY
83: mime_encode_text b
84: else
85: mime_encode_binary b
86: end
87: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 89
89: def mime_encode_text( body )
90: self.body = NKF.nkf('-j -m0', body)
91: self.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'}
92: self.encoding = '7bit'
93: end
MIME headers
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 315
315: def mime_version( default = nil )
316: if h = @header['mime-version']
317: h.version || default
318: else
319: default
320: end
321: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 323
323: def mime_version=( m, opt = nil )
324: if opt
325: if h = @header['mime-version']
326: h.major = m
327: h.minor = opt
328: else
329: store 'Mime-Version', "#{m}.#{opt}"
330: end
331: else
332: store 'Mime-Version', m
333: end
334: m
335: end
Alias for message_id
Alias for message_id=
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 525
525: def multipart?
526: main_type('').downcase == 'multipart'
527: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 211
211: def ordered_each
212: list = @header.keys
213: FIELD_ORDER.each do |name|
214: if list.delete(name)
215: [@header[name]].flatten.each {|v| yield name, v }
216: end
217: end
218: list.each do |name|
219: [@header[name]].flatten.each {|v| yield name, v }
220: end
221: end
[ show source ]
# File lib/action_mailer/vendor/tmail/mail.rb, line 350
350: def parts
351: parse_body
352: @parts
353: end
Alias for body
Alias for body=
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 45
45: def ready_to_send
46: delete_no_send_fields
47: add_message_id
48: add_date
49: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 298
298: def references( default = nil )
299: if h = @header['references']
300: h.refs
301: else
302: default
303: end
304: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 306
306: def references=( *strs )
307: set_string_array_attr 'References', strs
308: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 512
512: def reply_addresses( default = nil )
513: reply_to_addrs(nil) or from_addrs(nil) or default
514: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 217
217: def reply_to( default = nil )
218: addrs2specs(reply_to_addrs(nil)) || default
219: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 221
221: def reply_to=( *strs )
222: set_string_array_attr 'Reply-To', strs
223: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 205
205: def reply_to_addrs( default = nil )
206: if h = @header['reply-to']
207: h.addrs
208: else
209: default
210: end
211: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 213
213: def reply_to_addrs=( arg )
214: set_addrfield 'reply-to', arg
215: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 24
24: def send_text_to( smtp )
25: do_send_to(smtp) do
26: ready_to_send
27: mime_encode
28: end
29: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 18
18: def send_to( smtp )
19: do_send_to(smtp) do
20: ready_to_send
21: end
22: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 39
39: def send_to_0( smtp, from, to )
40: smtp.ready(from, to) do |f|
41: encoded "\r\n", 'j', f, ''
42: end
43: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 242
242: def sender( default )
243: f = @header['sender'] or return default
244: a = f.addr or return default
245: a.spec
246: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 248
248: def sender=( str )
249: set_string_attr 'Sender', str
250: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 226
226: def sender_addr( default = nil )
227: f = @header['sender'] or return default
228: f.addr or return default
229: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 231
231: def sender_addr=( addr )
232: if addr
233: h = HeaderField.internal_new('sender', @config)
234: h.addr = addr
235: @header['sender'] = h
236: else
237: @header.delete 'sender'
238: end
239: addr
240: end
Alias for set_disposition
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 362
362: def set_content_type( str, sub = nil, param = nil )
363: if sub
364: main, sub = str, sub
365: else
366: main, sub = str.split(%r</>, 2)
367: raise ArgumentError, "sub type missing: #{str.inspect}" unless sub
368: end
369: if h = @header['content-type']
370: h.main_type = main
371: h.sub_type = sub
372: h.params.clear
373: else
374: store 'Content-Type', "#{main}/#{sub}"
375: end
376: @header['content-type'].params.replace param if param
377:
378: str
379: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 439
439: def set_disposition( str, params = nil )
440: if h = @header['content-disposition']
441: h.disposition = str
442: h.params.clear
443: else
444: h = store('Content-Disposition', str)
445: end
446: h.params.replace params if params
447: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 138
138: def setup_forward( mail )
139: m = Mail.new(StringPort.new(''))
140: m.body = decoded
141: m.set_content_type 'message', 'rfc822'
142: m.encoding = encoding('7bit')
143: mail.parts.push m
144: end
[ show source ]
# File lib/action_mailer/vendor/tmail/net.rb, line 119
119: def setup_reply( m )
120: if tmp = reply_addresses(nil)
121: m.to_addrs = tmp
122: end
123:
124: mid = message_id(nil)
125: tmp = references(nil) || []
126: tmp.push mid if mid
127: m.in_reply_to = [mid] if mid
128: m.references = tmp unless tmp.empty?
129: m.subject = 'Re: ' + subject('').sub(/\A(?:\s*re:)+/i, '')
130:
131: m
132: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facade.rb, line 97
97: def strftime( fmt, default = nil )
98: if t = date
99: t.strftime(fmt)
100: else
101: default
102: end
103: end
[ show source ]
# File lib/action_mailer/vendor/tmail/facad