Skip to content
Snippets Groups Projects

GitLab SMTP

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Erick Hitter
    smtp_settings.rb 526 B
    # To enable smtp email delivery for your GitLab instance do next:
    # 1. Rename this file to smtp_settings.rb
    # 2. Edit settings inside this file
    # 3. Restart GitLab instance
    #
    # if Rails.env.production? do
      Gitlab::Application.config.action_mailer.delivery_method = :smtp
    
      ActionMailer::Base.smtp_settings = {
        address: "mail.example.com",
        port: 587,
        user_name: "something@example.com",
        password: "some password",
        domain: "example.com",
        authentication: :login,
        enable_starttls_auto: true
      }
    # end
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment