开发者

Configure mail.rb for localhost testing

开发者 https://www.devze.com 2022-12-18 06:21 出处:网络
is it possible to configure mail.开发者_开发百科rb (in RESTFUL authentication) to test email activation locally? the default file is

is it possible to configure mail.开发者_开发百科rb (in RESTFUL authentication) to test email activation locally? the default file is

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
    :address => "mail.example-domain.com",
    :port => 25,
    :domain => "www.example-domain.com",
    :authentication => :login,
    :user_name => "user@example-domain.com",
    :password => "secret"
}

thanks


This might help:

  • http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer

Just make a yaml file with all the config


I really like using MailTrap -- a local SMTP server that knows Just Enough about SMTP to listen to ActionMailer requests... and write them to a file where you can look at them later.

0

精彩评论

暂无评论...
验证码 换一张
取 消