ryanb / letter_opener

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

Email not stored on tmp/mails #80

Closed brauliobo closed 11 years ago

brauliobo commented 11 years ago

After sending emails in the console (see below) or via application' actions, an empty folder is created at tmp/mails

ActionMailer::Base.logger = Logger.new(STDOUT)
class Sender < ActionMailer::Base                                                                                                     
  def mail(to)
    recipients to
    from Environment.default.contact_email 
    reply_to Environment.default.contact_email
    subject "test"
    body render(:text => 'test')
  end
end
Sender.deliver_mail('youremail@domain.com')

I see in tree is:

➜  distribution git:(distribution-plugin) ✗ tree tmp/mails/
tmp/mails/
└── 1377272139_1868e78

My setup with Rails 2.3.15 is:

gem install specific_install
gem specific_install -l git://github.com/cavi21/letter_opener.git

The at config/local.rb I put:

require 'rubygems'
require 'letter_opener'
ActionMailer::Base.delivery_method = :letter_opener
ActionMailer::Base.custom_letter_opener_mailer = LetterOpener::DeliveryMethod.new(:location => Rails.root.join("tmp", "mails"))
nashby commented 11 years ago

сс @cavi21

nashby commented 11 years ago

Well, since we don't support Rails 2.3 I'm gonna close this. @cavi21 please take a look when you have some time. Thanks!

cavi21 commented 11 years ago

Hi @nashby sorry for not anwsering this earlier! thanks for put me on the loop also!

@brauliobo I'll look at this as soon as possible.

brauliobo commented 11 years ago

@cavi21 could you please enable issues on your fork?

cavi21 commented 11 years ago

@brauliobo Sorry on the delay I was on Burning Man last week so without any connection.

I'm trying to add the issues feature on the fork, but seems that is not working, I'll check with github if there is any issue on that. But also I'm going to be looking at this during this week.