|
57 | 57 |
|
58 | 58 | # Raise delivery errors in production |
59 | 59 | config.action_mailer.raise_delivery_errors = true |
| 60 | + config.action_mailer.perform_deliveries = true |
60 | 61 | config.action_mailer.delivery_method = :smtp |
61 | 62 |
|
62 | 63 | # Set host to be used by links generated in mailer templates. |
63 | 64 | config.action_mailer.default_url_options = { |
64 | | - host: ENV.fetch("APP_HOST", "example.com"), |
| 65 | + host: ENV.fetch("APP_HOST", "hackorum.dev"), |
65 | 66 | protocol: "https" |
66 | 67 | } |
67 | 68 |
|
68 | 69 | # Default from address for all mailers |
69 | 70 | config.action_mailer.default_options = { |
70 | | - from: ENV.fetch("MAIL_FROM", "noreply@example.com") |
| 71 | + from: ENV.fetch("MAIL_FROM", "noreply@hackorum.dev") |
71 | 72 | } |
72 | 73 |
|
73 | | - # SMTP server configuration |
| 74 | + # SMTP server configuration (Mailgun) |
74 | 75 | config.action_mailer.smtp_settings = { |
75 | | - address: ENV.fetch("SMTP_ADDRESS", "mail"), |
| 76 | + address: ENV.fetch("SMTP_ADDRESS", "smtp.eu.mailgun.org"), |
76 | 77 | port: ENV.fetch("SMTP_PORT", "587").to_i, |
77 | | - domain: ENV.fetch("SMTP_DOMAIN", "example.com"), |
78 | | - # No authentication needed for internal mail server |
79 | | - authentication: nil, |
80 | | - enable_starttls_auto: false, |
81 | | - openssl_verify_mode: "none" |
| 78 | + domain: ENV.fetch("SMTP_DOMAIN", "hackorum.dev"), |
| 79 | + user_name: ENV.fetch("SMTP_USERNAME"), |
| 80 | + password: ENV.fetch("SMTP_PASSWORD"), |
| 81 | + authentication: :plain, |
| 82 | + enable_starttls_auto: true |
82 | 83 | } |
83 | 84 |
|
84 | 85 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
|
0 commit comments