Discourse and MailJet issue

I had everything working fine with Amazon’s SES in a Sandbox mode, but Amazon denied me accessing to the production mode.
I decided to give a try with MailJet but I think I’m missing something and I can’t get my head around it.

Any idea what I’m doing wrong?

No Error in Discourse, it says Mail Sent
I can Telnet the SMTP address and Port

In MailJet:
SPF/DKIM are Green
Forum Domain is Active
and my zzz@gmail.com is Active as well

my app.yml:

  DISCOURSE_SMTP_ADDRESS: in-v3.mailjet.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: xxx (from the Sub-Account API)
  DISCOURSE_SMTP_PASSWORD: "yyy" (from the Sub-Account API)
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: gmail.com
  DISCOURSE_NOTIFICATION_EMAIL: zzz@gmail.com

Your can’t send mail from Gmail.com. You have to use an address for the domain that you configured mail hey to send from. Smtp domain should be your host name, though it probably doesn’t matter (unless it does).

1 Like

I just tried to change SMTP_DOMAIN from gmail.com my Route53 domain and also tried removing the TLS encryption but no luck.
Is that how it should be setup?

Not sure where the issue comes from at this point…

Like this:

  DISCOURSE_SMTP_ADDRESS: in-v3.mailjet.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: xxx (from the Sub-Account API)
  DISCOURSE_SMTP_PASSWORD: "yyy" (from the Sub-Account API)
  DISCOURSE_SMTP_ENABLE_START_TLS: false           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: mydomain.net
  DISCOURSE_NOTIFICATION_EMAIL: noreply@mydomain.net

Then mail jet is accepting it. We can’t guess whether it’s not sending it or your mail box is rejecting it (you checked spam?)

See Troubleshoot email on a new Discourse install

Yep I’ve tried this and tried to resetup the whole MailJet, regenerate keys.
Tried the different port (25, 465, 587 TLS or not) with no luck.
With 25 and 465, at least Discourse tells me it doesn’t work, with 465 it says `250 OK queued as xxxx’

Thing is in MailJet, the stats show not a single email in the period.

The keys are fine. It’s the sending address that’s the problem (I think).

If discourse says it got delivered then it was accepted by mail jet and should be in the logs. Have you tried mail-tester.com?

Well, that’s a pretty good tool…
I initially tried and the email never arrived.
I received a notification from MailJet that I was trying to send an email from noreply@www.zzz.net, which is one change I tried a bit earlier following the Troubleshoot procedure.

I removed the www, essentially going back to my previous config, but this time it worked… I think I’ll never know why.

Thank you for you help, everything was going so well until Amazon SES denied me and had to find an alternative.

Here is the config that works now:

  DISCOURSE_SMTP_ADDRESS: in-v3.mailjet.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: xxx
  DISCOURSE_SMTP_PASSWORD: "yyy"
  DISCOURSE_SMTP_ENABLE_START_TLS: false           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: mydomain.net
  DISCOURSE_NOTIFICATION_EMAIL: noreply@mydomain.net
1 Like