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.

inline attachment

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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -