ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 237 forks source link

letter_opener works fine in ubuntu but not in windows, someone know why? #139

Closed Ingosmar89219 closed 7 years ago

Ingosmar89219 commented 7 years ago

i have a project in development in ubuntu works fine, open the view in the browser but in windows open a file with name "rich.html" in the editor sublime text. someone can help me? some information: GEM gem 'letter_opener'

development.rb config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } config.action_mailer.delivery_method = :letter_opener config.action_mailer.perform_deliveries = true

my_payment.rb class MyPayment < ActiveRecord::Base belongs_to :shopping_cart after_update :send_email

  private

  def send_email
      MyPaymentMailer.mypayment_mail(self).deliver_now
  end

end

nashby commented 7 years ago

hey, looks like it's issue with launchy gem we use to open email. You can try to set $BROWSER variable and point it to browser and see if that helps: https://github.com/copiousfreetime/launchy#using-the-browser-environment-variable