Search code examples
rubyruby-on-rails-4actionmailerpremailer

not able to load images in mails using premailer-rails


I am using premailer-rails latest version gem to send HTML mail , but it is not able to load the images from my localhost.

I already added : config.action_mailer.asset_host = 'http://localhost:3000/' in my ENV files.

Please suggest if anything is missing.


Solution

  • The Real Problem was that gmail servers were not taking the http request and hence images were not rendering correctly.

    I added the SSL certificates locally so that I can access https:\localhost:3000 and solved my problem.