Try SMTP Server From Rails Console

When working with a none technical person, it is really difficult to identify the problem of SMTP config. It hard to define because the credentials or our config is wrong. Also, we don’t want to config and release it then user spot it is not working. So I create a snippet that can test the SMTP from rails console before you release it.

Start your rails console by type rails c on your terminal.

Config your Mailer.

ActionMailer::Base.smtp_settings = {
  address: '',
  port: 465,
  authentication: 'plain',
  enable_starttls_auto: true,
  user_name: 'smtp_user',
  password: 'smtp_password'

Sending test email

  from: "",
  to: "",
  subject: "Test",
  body: "Test"

If you received the test email it means everything is fine.