Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Add ActionMailer file delivery method

#2438

We've found it useful to have emails saved as files when running in development. Here's a patch to enable that:

http://github.com/harukizaemon/r...

and

http://github.com/harukizaemon/r...

(sorry for the double commit)

Reported by Simon Harris · April 7th, 2009 @ 03:48 AM

State: committed
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Simon Harris
    Simon Harris

    OK let me try that diff again this time with the commits the right way around :)

    April 7th, 2009 @ 04:39 AM

  2. Xavier Noria
    Xavier Noria

    I like this feature.

    The rdoc for :location mentions sendmail... Could you revise that bit?

    April 7th, 2009 @ 10:51 AM

  3. Simon Harris
  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from actionmailer to actionmailer, bugmash

    August 6th, 2009 @ 01:30 PM

  5. Elise Huard
    Elise Huard

    when i try to apply the patch, i get
    Patch does not have a valid e-mail address.

    August 7th, 2009 @ 10:01 PM

  6. Eric Davis
    Eric Davis

    +1 This patch will make testing email rendering a lot easier in development and could replace the role of the inaction_mailer gem.

    I've added some additional enhancements to the patch:

    • Try to use the tmp directory in Rails Root and fallback to the system tmp directory
    • Create the directory for the mail if it doesn't exist
    • Write emails to users in the To, CC, and BCC field instead of just To

    I've attached a test.

    August 8th, 2009 @ 05:12 AM

  7. Eric Davis
    Eric Davis

    I've attached a patch for the master branch also.

    August 8th, 2009 @ 05:30 AM

  8. Repository
    Repository
    • State changed from new to committed

    (from [fbe6c3c19553fd05edc904af62fbfc8aee1d907d]) Adds a :file delivery_method to save email to a file on disk

    Signed-off-by: Michael Koziarski michael@koziarski.com
    [#2438 Add ActionMailer file delivery method state:committed] http://github.com/rails/rails/commit/fbe6c3c19553fd05edc904af62fbfc...

    August 8th, 2009 @ 05:32 AM

  9. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from actionmailer, bugmash to actionmailer
    • Milestone cleared.

    August 8th, 2009 @ 11:04 PM

  10. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 11th, 2010 @ 10:54 AM