actionmailer

Rails attachments inline are not shown correctly in gmail

我只是一个虾纸丫 提交于 2019-11-26 17:18:44
问题 Can anyone point me to the problem? I'm using inline attachments in my rails 3.1 application mailer. The letter also contains images which are stored at amazon w3 servers. The problem is that gmail doesn't display the letter correctly. I have inline attachments in the letter. But Gmail shows these files as attached ones. The letter also contains an attached html page which contains the letter itself. All gmail displays is a set of symbols which i suppose to a base64 version of one of the

What is the right way to embed image into email using Rails?

依然范特西╮ 提交于 2019-11-26 15:47:16
问题 What is the right way to embed an image into email using Rails? 回答1: I combined the answer from Oksana with a custom helper approach and got the following to work quite nicely. app/helpers/email_helper.rb module EmailHelper def email_image_tag(image, **options) attachments[image] = File.read(Rails.root.join("app/assets/images/#{image}")) image_tag attachments[image].url, **options end end app/mailers/base_mailer.rb class BaseMailer < ActionMailer::Base add_template_helper(EmailHelper) end app

How do I set up email confirmation with Devise?

安稳与你 提交于 2019-11-26 08:39:22
问题 Is there a tutorial out there that explains how to set up Devise\'s signup confirmation email from scratch (in both development and production), i.e. if you don\'t have Action Mailer set up? Google searching has just turned up a bunch of separate pieces related to this. No one piece explains enough, and I\'m not sure how they fit together. Is there a step-by-step explanation out there, or even something that explains the initial steps? Finally got it working. Followed all the steps in the

Heroku/devise - Missing host to link to! Please provide :host parameter or set default_url_options[:host]

梦想与她 提交于 2019-11-26 07:56:28
问题 I am trying to push my app on heroku. I am still in dev. I use devise with the confirmable module. When I try to add a user with the heroku console I got this error: Missing host to link to! Please provide :host parameter or set default_url_options[:host] in test and dev environment i have the following line: environments/development.rb and environments/test.rb config.action_mailer.default_url_options = { :host => \'localhost:3000\' } I don\'t have set up something in the production