Sending mail with Rails 3 in development environment

前端 未结 8 1256
执念已碎
执念已碎 2020-12-04 06:29

I\'m sure this has been asked a million times before but I can\'t find anything that works for me so I\'m asking again!

I just need a way of sending emails using Act

8条回答
  •  -上瘾入骨i
    2020-12-04 07:28

    Try using 'sendmail' instead of 'smtp'.

    ActionMailer::Base.delivery_method = :sendmail
    ActionMailer::Base.sendmail_settings = {
      :address              => "smtp.gmail.com",
      :port                 => "587",
      :domain               => "gmail.com",
      :user_name            => "xxx@gmail.com",
      :password             => "yyy",
      :authentication       => "plain",
      :enable_starttls_auto => true
    }
    

提交回复
热议问题