Skip to content

Commit

Permalink
[WIP] Ticket CV2-5067: Use Mailcatcher to send emails
Browse files Browse the repository at this point in the history
  • Loading branch information
caiosba committed Aug 20, 2024
1 parent e79c18b commit acbe054
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ development: &default
smtp_user: # '<GMAIL USERNAME>'
smtp_pass: # '<GMAIL PASSWORD>'
smtp_default_url_host: 'http://localhost:3333' # Used to construct URLs for links in email
smtp_use_mailcatcher: false

# Pusher notification service https://pusher.com/channels
#
Expand Down
7 changes: 7 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,11 @@
else
puts '[WARNING] config.hosts not provided. Only requests from localhost are allowed. To change, update `whitelisted_hosts` in config.yml'
end

if ENV['smtp_use_mailcatcher'] || cfg['smtp_use_mailcatcher']
config.action_mailer.smtp_settings = {
address: '127.0.0.1',
port: 1025
}
end
end

0 comments on commit acbe054

Please sign in to comment.