Why does ActionMailer (rails 2.3.5) start sending text / html email intermittently?

I have a Ruby on Rails application working with rails v2.3.5 that sends text / html address for quite some time. Recently, we noticed that some recipients received letters in the form of HTML code, and not for a visualized HTML / ERB template. However, this is not everywhere, and often the same email client will receive both HTML and HTML as text, so I don’t think this is a client email program.

Here is a snippet from Notifier.rb that extends ActionMailer :: Base. This action displays customer_order_notification.text.html.erb

def customer_order_notification(order)
  subject        "Thanks for your order!"
  body           :order => order
  recipients     RAILS_ENV == 'development' ? APP_CONFIG['dev_email'] : order.email
  bcc            RAILS_ENV == 'production' ? APP_CONFIG['supervisor_email'] : nil
  from           'MyWebsite <support@mywebsite.com>'
  sent_on        Time.now
  content_type   = "text/html"
  headers        = {}
end #end method customer_order_notification

The server runs a postfix for the email software, and the ActionMailer configuration is below:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => '127.0.0.1',
  :port => 25,
  :domain => 'localhost'
}
+3
1

, 2.3.5 2.3.8, , , :

https://github.com/mikel/tmail/issues/7

, , : . Outlook?

0

Source: https://habr.com/ru/post/1789479/


All Articles