Rails inline mail attachments not working properly -
i using actionmailer send inline image. user_mailer.rb file looks 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 view contains:
<%= image_tag attachments['orglogo.png'].url %> the image isn't appearing in mail. how appears in mail client. have tested on outlook , hotmail.

in production app sending inline image using above method , me working fine me. created public gist working snippet of code. please see if helps you. gistpublic gist mailers
if doesn't work please try paste development.log here.
thanks
Comments
Post a Comment