ActionMailer and development mode, can it write to a file or something?

后端 未结 3 632
南旧
南旧 2021-02-12 10:42

I want to test my registration process locally (development mode), how can I test how emails will be sent out and rendered etc?

I am not referring to a unit-test or inte

3条回答
  •  别那么骄傲
    2021-02-12 11:06

    This is configurable in the config/environments/*.rb files.

    # output to tmp/mails directory
    config.action_mailer.delivery_method = :file
    # ... and to specify output location
    # config.action_mailer.file_settings = { :location => Rails.root.join('tmp/mail') }
    

    Detailed information can be found in the config section of Action Mailer Basics or on ActionMailer::Base API


    Rails 4.2 :file delivery method source and Mail::FileDelivery source

提交回复
热议问题