Revision 275e20ec
Added by Marc Dequènes almost 16 years ago
- ID 275e20ecd94d3a83477dbec7e39e75ee6f619fee
lib/cyborghood/lang_additions.rb | ||
---|---|---|
self.class.human_name
|
||
end
|
||
end
|
||
|
||
# WARNING: the TMail send_to() methos is _unsuable_, even with the following fixes
|
||
require 'tmail'
|
||
module TMail
|
||
class Mail
|
||
# fix method using obsoleted from_address() method
|
||
def do_send_to( smtp )
|
||
from = from_addrs or raise ArgumentError, 'no from address'
|
||
(dests = destinations).empty? and raise ArgumentError, 'no receipient'
|
||
yield
|
||
send_to_0 smtp, from, dests
|
||
end
|
||
|
||
# fix method using encoded() with a wrong number of args
|
||
def send_to_0( smtp, from, to )
|
||
smtp.ready(from, to) do |f|
|
||
encoded "\r\n", 'j', f
|
||
end
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[evol] create basic mail reply and send it using SMTP