```ruby
if Rails.env.staging? || Rails.env.production?
  SMTP_SETTINGS = {
    address: ENV.fetch('SMTP_ADDRESS'), # example: 'smtp.sendgrid.net'
    authentication: :plain,
    domain: ENV.fetch('SMTP_DOMAIN'), # example: 'this-app.com'
    password: ENV.fetch('SMTP_PASSWORD'),
    port: '587',
    user_name: ENV.fetch('SMTP_USERNAME')
  }
end
```

Enable SMTP/TLS in SMTP settings
user
```ruby
if Rails.env.staging? || Rails.env.production?
  SMTP_SETTINGS = {
    address: ENV.fetch('SMTP_ADDRESS'), # example: 'smtp.sendgrid.net'
    authentication: :plain,
    domain: ENV.fetch('SMTP_DOMAIN'), # example: 'this-app.com'
    enable_starttls_auto: true,
    password: ENV.fetch('SMTP_PASSWORD'),
    port: '587',
    user_name: ENV.fetch('SMTP_USERNAME')
  }
end
```
assistant