I am sending html emails through the action mailer and something strange occur: an inline image does appear on the email sent from the production deploy but not from local develomment.
professionnel_mailer.rb
class ProfessionnelMailer < ApplicationMailer
layout 'professionnelmailer'
def notification(professionnel)
attachments.inline['image200.png'] = File.read("#{Rails.root}/app/assets/images/image200.png")
@professionnel = professionnel
mail(to: @professionnel.email, subject: "You have received a notification !")
end
end
notification.html.erb
<%= image_tag(attachments['image200.png'].url)%>
<h1>Hello <%= @professionnel.first_name %> !</h1>
Of course image200.png is present locally and remotely. And email is received in both cases, then my Amazon AWS SES setup is corrrect in both environments.. Not very sure where it breaks..