if Rails.env.production?
  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.perform_deliveries = true
  ActionMailer::Base.raise_delivery_errors = true
  ActionMailer::Base.smtp_settings = {
    :address              => "{{SMTP_HOST}}",
    :port                 => {{SMTP_PORT}},
    :domain               => "{{SMTP_DOMAIN}}",
    :user_name            => "{{SMTP_USER}}",
    :password             => "{{SMTP_PASS}}",
    :authentication       => :login,
    :enable_starttls_auto => {{SMTP_STARTTLS}}
  }
end

if Rails.env.production?
  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.perform_deliveries = true
  ActionMailer::Base.raise_delivery_errors = true
  ActionMailer::Base.smtp_settings = {
    :address              => "{{SMTP_HOST}}",
    :port                 => {{SMTP_PORT}},
    :domain               => "{{SMTP_DOMAIN}}",
    :user_name            => "{{SMTP_USER}}",
    :password             => "{{SMTP_PASS}}",
    :authentication       => {{SMTP_AUTHENTICATION}},
    :enable_starttls_auto => {{SMTP_STARTTLS}}
  }
end

Fix SMTP Authentification not exist in smtp config
Fix SMTP Authentification not exist in smtp config

Forget {{}} in smtp file and :login not replaced by init script