Discourse aws EC2 G Suite troubleshoting

I’ve fresh installation of discourse on amazon EC2 instance and have been configured SMTP with G suite corporate account. But can’t finish initial settings because of SMTP. I’ve tried different smtp settings but with no success.

DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: my@corporate.email
DISCOURSE_SMTP_PASSWORD: "mypassword"
DISCOURSE_SMTP_ENABLE_START_TLS: true   

This is my final settings.

And I’ve read a lot of topics on discourse forum but haven’t solution. Please help.
https://meta.discourse.org/t/anyone-using-gmail-for-smtp/41371

I suggest the official email troubleshooting #howto.

Also if you read that topic you’d see

Not entirely sure what you’re asking – you mean in the context of that error? Yes, the G Suite (neé Google Apps) domain is custom, not @gmail.com.

So if your SMTP_ADDRESS is gmail.com that already seems wrong. You should be using your actual domain there, as configured in G suite.

https://support.google.com/a/answer/176600?hl=en

Or per the above, smtp-relay.gmail.com maybe?

2 Likes

Thx Jeff, I’ve configured SMPT as it shown in google instructions. And I’ve also try smtp-relay.gmail.com and smtp.gmail.com ports 465, 587.

My email not a ****@gmail.com. I’m using exact my G Suite email account.

So, finally I did it!

DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
DISCOURSE_SMTP_PORT: 465 → And I’ve also changed port to 587
DISCOURSE_SMTP_USER_NAME: my@corporate.email
DISCOURSE_SMTP_PASSWORD: “mypassword” ← error here. I’ve removed quotes and all works just fine.
DISCOURSE_SMTP_ENABLE_START_TLS: true

By the way quotes where added while bootstrapping.

Thx for reply

5 Likes