1.8 KiB
1.8 KiB
Development Mail Server
This is a example to how integrate a mailing service with a development environment of Consul.
In this example we used Mailgun.
Create an account in Mailgun
- Skip the credit card form
- And activate your account with the link sent by email
Domain configuration
-
Since you don't have a domain yet, you should click in the sandbox that is already created;
Consul mailing configuration for development environment
- Go to
config/environments/development.rbfile; - Add the lines on the file to configure the mail server:
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
:address => '',
:port => 2525,
:domain => '',
:user_name => '',
:password => '',
:authentication => :plain,
:enable_starttls_auto => true,
:ssl => false
}
- Fill,
address,domain,user_name,passwordwith your information. The file would look like:
Consul mailing configuration for production environment
- Go to
config/environments/production.rbfile. - Add the same action mailer settings configuration, but now with your production mail server information.
- Pay attention because you will need to change the port number to 587.
You can also use Mailgun to production, adding your custom domain. Mailgun’s logs sent and delivered emails.



