Skip to content

Commit 0b4b2da

Browse files
authored
Merge pull request #2 from next-l/setup-mail-server
メールサーバーの設定を追加
2 parents 477de0e + 6931f0f commit 0b4b2da

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

1.4/enju_install_vm_4.adoc

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,35 @@ $ docker compose up -d
6565
[[setup-mail-server]]
6666
==== メールサーバーの設定
6767

68-
(準備中です。)
68+
パスワードの再発行や資料予約通知などのメール送信機能を使うために必要です。
69+
70+
config/environments/production.rb を以下のように変更します。
71+
[source]
72+
----
73+
Rails.application.configure do
74+
# 中略
75+
76+
# hostオプションはEnjuを動作させているホストのホスト名を指定
77+
config.action_mailer.default_url_options = {host: 'enju.example.jp'}
78+
79+
# SMTPサーバの設定
80+
# address, port, domain, user_name, passwordなどを変更してください
81+
# 不要な設定はコメントアウトできます。設定例は以下も参照してください
82+
# https://railsguides.jp/action_mailer_basics.html#gmail%E7%94%A8%E3%81%AEaction-mailer%E8%A8%AD%E5%AE%9A
83+
config.action_mailer.delivery_method = :smtp
84+
config.action_mailer.smtp_settings = {
85+
address: 'yoursmtpserver.example.jp',
86+
port: 25,
87+
domain: 'example.jp',
88+
user_name: 'smtpusername',
89+
password: 'smtppassword',
90+
authentication: 'plain',
91+
enable_starttls_auto: true,
92+
open_timeout: 5,
93+
read_timeout: 5
94+
}
95+
end
96+
----
6997

7098
include::enju_install_vm_toc.adoc[]
7199

0 commit comments

Comments
 (0)