Project

General

Profile

« Previous | Next » 

Revision 43dd8a57

Added by Marc Dequènes almost 16 years ago

  • ID 43dd8a57ef1b8fa5098cac08e4b0d009e4977e8b

[evol] set a nice filename in replies attachments

View differences:

postman
logger.info "User is manager of the zone"
srv_dns = CyborgHood::Services::DNS.new(zone)
result.message = "Requested zone content attached."
result.refs = [srv_dns.read_zone]
zone_ref = {:content => srv_dns.read_zone, :filename => "dnszone_#{zone}.txt"}.to_ostruct
result.refs = [zone_ref]
else
logger.info "User is not allowed to manage the zone"
result.message = "You are not allowed to manage this zone."
......
reply_attachments.each do |attachment|
p = CyborgHood::Mail.new
p.set_content_type("text", "plain", {'charset' => "utf-8"})
p.set_disposition("attachment", {'filename' => "test.rb"})
p.quoted_printable_body = attachment
p.set_disposition("attachment", {'filename' => attachment.filename})
p.quoted_printable_body = attachment.content
mail_reply.parts << p
end
end

Also available in: Unified diff