MineR

牵手生命线就交错

如何在rails开发环境里里配置mailcather

23 January 2014

Step One, install mailcatcher, type the command in terminal

gem install mailcatcher

Step Two, run mailcatcher, type the command in terminal

mailcatcher

Step Three, change the configuration in /config/environments/development.rb

 1 config.action_mailer.raise_delivery_errors = true
 2 config.action_mailer.default_url_options = { :host => 'localhost:3000' }
 3 config.action_mailer.delivery_method = :smtp
 4 config.action_mailer.perform_deliveries = true
 5 config.action_mailer.default :charset => "utf-8"
 6 config.action_mailer.smtp_settings = {
 7   :address => "localhost",
 8   :port => 1025,
 9   :domain => "localhost:3000"
10 }

Step Four, open http://127.0.0.1:1080 in browser and now you can test the email sending function.

在家用路由器内网搭建可以互联网访问的服务器

1. 将一台废旧的电脑安装linux系统(我安装了ubuntu 32位 16.04),变成一台服务器2. 用网线连接上内网路由器,并且绑定内网IP地址3. 设置DMZ将外网访问转发到服务器4. 注册一个DDNS服务,并且申请一个域名5. 将域名和账号填入路由器设置里(我家用...… Continue reading

爱在时间里

Published on December 11, 2015