Project

General

Profile

« Previous | Next » 

Revision 275e20ec

Added by Marc Dequènes about 15 years ago

  • ID 275e20ecd94d3a83477dbec7e39e75ee6f619fee

[evol] create basic mail reply and send it using SMTP

View differences:

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