I want to send multiple attachments but not declaring them just octet-stream doing it right now like this
newsletter.attachments.each do |file|
contend = File.new(file.path+"/"+file.filename, "r")
attachment "application/octet-stream" do |a|
a.body = contend.read
a.filename = file.filename
end unless file.blank?
since not all clients can handel that, so is there a rails plugin that selects the mime-type based on file extension, or even content?
googled alot, couldn't find what i was searching for
or am I doing this completeley wrong?