# Aucun email envoyé avec une configuration Mailjet sur VPS

**URL:** https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875
**Category:** Support
**Tags:** docker, email
**Created:** [Novembre 21, 2015, 10:01 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875 "2015-11-21T10:01:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jonathanb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathanb/32/122090_2.png) [@Jonathanb](https://meta.discourse.org/u/Jonathanb)
#### Post date: [Novembre 21, 2015, 10:01 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875/1 "2015-11-21T10:01:06Z")

</div>

Hi.

First of all. Thanks very much for this great product 😄

I try to configure a new Discourse instance on my [OVH VPS](https://www.ovh.com/fr/vps/vps-ssd.xml) in order to send mail with mailjet (or mandrill) but no mail send. I tried many things without success.

Any idea? Where can I find logs?

My config below:

```
env:
  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: "bmxperience@gmail.com"

  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: "discourse.bmxperience.com"

  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS: "in-v3.mailjet.com" # (mandatory)
  DISCOURSE_SMTP_PORT: 587 # (optional)
  DISCOURSE_SMTP_USER_NAME: "my-mailjet-api-key" # (optional)
  DISCOURSE_SMTP_PASSWORD: "my-mailjet-secret-key" # (optional, WARNING the char '#' in pw can cause problems!)
  #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
.
.
.
run:
  - exec: echo "Beginning of custom commands"

  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  - exec: rails r "SiteSetting.notification_email='forum@bmxperience.com'"
  ## After getting the first signup email, re-comment the line. It only needs to run once.

```

I successfully send mail using telnet:

```
root@vps197853:~# telnet in-v3.mailjet.com 587
Trying 46.105.54.204...
Connected to in.mailjet.com.
Escape character is '^]'.
220 leela-8.mailjet.com ESMTP Mailjet
auth login
334 VXNlcm5hbWU6
Mqsdfqsdfqsdfqsdfsdf= #(base64 of mailjet api key)
334 UGFzc3dvcmQ6
Msdsdfsdfsdfsdfsdfdsffdsdfsdfsdf= #(base64 of mailjet secret key)
235 2.7.0 Authentication successful
MAIL FROM:forum@bmxperience.com
250 2.1.0 Ok
RCPT TO:bmxperience@gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
To:bmxperience@gmail.com
From:forum@bmxperience.com
Subject: Test Mailjet

Yeah!
.
250 2.0.0 Ok: queued as 823102E400AF
quit
221 2.0.0 Bye

```

And the last command line after the ./launcher start app

```
+ /usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=bmxperience@gmail.com -e DISCOURSE_HOSTNAME=discourse.bmxperience.com -e DISCOURSE_SMTP_ADDRESS=in-v3.mailjet.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=my-mailjet-api-key -e DISCOURSE_SMTP_PASSWORD=my-mailjet-secret-key -h vps221296.ovh.net-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 2222:22 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log local_discourse/app /sbin/boot
dbf7ef50186eaf105208e9d5984f706f0d2c0ea5c23fbe22ef787f624f8f2547

```

---

<div class="post-metadata">

### Author: ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### Post date: [Novembre 21, 2015, 1:42 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875/2 "2015-11-21T13:42:35Z")

</div>

I’m not to familiar with mail jet as I use Send Grid with my discourse instance but that shouldn’t matter.

- if you force an email to be sent from discourse (sign up a test user etc) and when you check on yor mail jet dashboard, do any outbound emails show. If so are they being “dropped” ?

- have you verified your SMTP settings on yourdiscourse/admin/email ?

---

<div class="post-metadata">

### Author: ![Hector](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hector](https://meta.discourse.org/u/Hector)
#### Post date: [Novembre 21, 2015, 2:35 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875/3 "2015-11-21T14:35:39Z")

</div>

Did you try disabling TLS in the config? That would be a difference between your settings and the telnet test.

---

<div class="post-metadata">

### Author: ![Jonathanb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathanb/32/122090_2.png) [@Jonathanb](https://meta.discourse.org/u/Jonathanb)
#### Post date: [Novembre 21, 2015, 10:55 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875/4 "2015-11-21T22:55:15Z")

</div>

> [@Hector](#):
>
> Did you try disabling TLS in the config?

Good point! I changed this line:

`DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)`

and… it works!

Thanks very much.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Juin 8, 2024, 12:45 UTC](https://meta.discourse.org/t/no-mail-send-with-a-mailjet-config-on-vps/35875/5 "2024-06-08T12:45:58Z")

</div>

Ce sujet a été automatiquement fermé après 3122 jours. Les nouvelles réponses ne sont plus autorisées.
