<% attachments.each do |a| %>
<% attachment_url = get_attachment_url(:id => incoming_message.info_request_id,
:incoming_message_id => incoming_message.id, :part => a.url_part_number, :file_name => a.display_filename) %>
<% if ['application/pdf', 'application/msword', 'text/plain', 'image/tiff'].include?(a.content_type) %>
<% else %>
Attachment:
<% end %>
<%= link_to a.display_filename, attachment_url %>
<% end %>
<%= body %>