I am using ActionMailer to send an inline image. The user_mailer.rb file looks like this:
def welcome_mail(user, mail_content, subject)
@user = user
@mail_content = mail_content.html_safe
attachments.inline['orglogo.png'] = File.read("#{Rails.root}/app/assets/images/orglogo.png")
mail(:to => ["testuser@domain.com"],:Subject => subject)
end
And the view contains:
<%= image_tag attachments['orglogo.png'].url %>
The image isn't appearing in the mail. This is how it appears in the mail client. I have tested on Outlook and Hotmail.