sameersbn / sameersbn/docker-gitlab

Emails with MailJet

Open
#889 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

Hello

I would like to use MailJet to send emails from GitLab. But, it doesn't work :-(

MailJet explain that :

  • User : <API Key>
  • Pass: <API Secret>
  • SMTP: in-v3.mailjet.com
  • PORT: 25 or 587
    If TLS doesn't work on 587 port, try 465 and/or use SSL instead.

My gitlab environments are:

  • SMTP_ENABLED=true
  • SMTP_DOMAIN=in-v3.mailjet.com
  • SMTP_HOST=in-v3.mailjet.com
  • SMTP_USER=< API Key >
  • SMTP_PASS=< API Pass >
  • SMTP_PORT=587 # 25 or 465 doesn't work
  • SMTP_TLS=true # The same with false
  • SMTP_STARTTLS=false
$ docker exec -ti gitlab cat config/initializers/smtp_settings.rb

# To enable smtp email delivery for your GitLab instance do the following:
#1. Rename this file to smtp_settings.rb
#2. Edit settings inside this file
#3. Restart GitLab instance
#
# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
#
# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests

if Rails.env.production?
  Rails.application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: "in-v3.mailjet.com",
    port: 465,
    user_name: "<API Key>",
    password: "<API Pass>",
    domain: "in-v3.mailjet.com",
    authentication: "login",
    enable_starttls_auto: false,
    openssl_verify_mode: "none",
    tls: true
  }
end

Do you see any misconfiguration ?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing config/initializers/smtp_settings.rb and the Docker environment variables shown, then compare the MailJet SMTP requirements with the configured ActionMailer values. Done would require a confirmed, reproducible configuration or documented correction; the issue does not define a code change or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ruby
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.