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

后端 未结 3 832
闹比i
闹比i 2021-02-12 10:49

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:14

    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

提交回复
热议问题