我已经使用 devise 设置了一个 rails 应用程序来实现简单的用户注册和登录功能。我已经包含确认邮件来确认注册。确认邮件在我的 localhost 中工作正常,但是如果我从其他机器确认帐户它返回错误。我应该怎么做才能更改我的邮件主机???
这就是我设置操作邮件的方式
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
这是 Confirmation.html.erb 文件:
<p>Welcome <%= @email %>!</p>
<b> <h1> <font color="RED">Q-</font>Link </h1> </b>
<p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>