class Schleuder::KeywordHandlers::AttachListKey

Public Instance Methods

attach_list_key() click to toggle source
# File lib/schleuder/keyword_handlers/attach_list_key.rb, line 6
def attach_list_key
  new_part = Mail::Part.new
  new_part.body = @list.export_key
  new_part.content_type = 'application/pgp-keys'
  new_part.content_description = "OpenPGP public key of #{@list.email}"
  new_part.content_disposition = "attachment; filename=#{@list.fingerprint}.pgpkey"
  @mail.add_part new_part
  nil
end