Skip to content

Commit 91b1ddd

Browse files
committed
「4-4-3 メールサーバーの設定」を追加
1 parent 0931c47 commit 91b1ddd

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

1.2/enju_install_vm_4.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,31 @@ VirtualBoxの画面にマウスカーソルをあわせてクリックするだ
234234

235235
再発行したパスワードのメール送信の機能などを使うために必要です。
236236

237-
(設定方法についての説明は準備中です)
237+
config/environments/production.rb を以下のように変更します。
238+
239+
```
240+
Rails.application.configure do
241+
# 中略
242+
243+
# hostオプションはEnjuを動作させているホストのホスト名を指定
244+
config.action_mailer.default_url_options = {host: 'enju.example.jp'}
245+
246+
# SMTPサーバの設定。不要な設定はコメントアウトできます
247+
# 設定例は以下も参照してください
248+
# http://railsguides.jp/action_mailer_basics.html#gmail用のaction-mailer設定
249+
config.action_mailer.delivery_method = :smtp
250+
config.action_mailer.smtp_settings = {
251+
address: 'yoursmtpserver.example.jp',
252+
port: 25,
253+
domain: 'example.jp',
254+
user_name: 'smtpusername',
255+
password: 'smtppassword',
256+
authentication: 'plain',
257+
enable_starttls_auto: true
258+
}
259+
end
260+
```
261+
238262
{::comment}関連issue#799{:/comment}
239263

240264
{::comment}

0 commit comments

Comments
 (0)