sendcloud 发邮件

1 sendcloud.soho.com

注册并完成个人认证
生成api_key


2 letter_opener 能正常预览邮件之后 我们要在开发环境中真实发送邮件

```ruby config/environments/development.rb 
...(略)
 config.action_mailer.default_url_options = { host: 'localhost:3000' }
- config.action_mailer.delivery_method = :letter_opener
  config.action_mailer.delivery_method = :smtp
     ActionMailer::Base.smtp_settings = {
       address: "smtpcloud.sohu.com",
       port: 25,
       domain: "heroku.com",
       authentication: "login",
       enable_starttls_auto: true,
       user_name: ENV["SEND_CLOUD_USER_NAME"],  #你的api_user
       password: ENV["SEND_CLOUD_USER_KEY"]     #你的api key
       }
end

```

Comments

comments powered by Disqus