Forem Creators and Builders

Benjamin Bilgehan
Benjamin Bilgehan

Posted on • Updated on

Forem DigitalOcean setup SMTP does not work.

We have setup our own selfhosted forem on a digital ocean droplet. I have created a sendgrid free plan and set all the settings as below

image

When add a new user and user never receives invitation emails. I tested sendgrid SMTP with a tool and it works greatly.

FOR DOMAIN AUTHENTICATION ( I use namecheap )

Do not add your domain name. like below.
for example sendgrid gives you these configuration
em1754.domain.com
s1._domainkey.domain.com

s2._domainkey.domain.com

so you need to remove the ".domain.com"

otherwise you can not verify.

I have completed all the tasks for setting up SMTP. Sendgrid domain and email verification and authentication are done. Cname records are done. I dont still receive any emails from my forem applciation. This is really frastrating.

Discussion (12)

Collapse
akhil profile image
Akhil Naidu • Edited

I would suggest you confirm your SMTP details via this SMTP testing tool

  • If you have any issues during the testing, the issue lies within your SMTP details.
  • If you have successful test but can't use them in Forem, I would suggest you to configure, two things:
  1. Configure default sender email-id in Forem via the .env file
  2. Create a sender email or from email within your email service provider

Digital ocean is just a platform to provide computational power, it has nothing to do with email services. In fact, Leewardslope is an SMTP configured Forem on Digital Ocean.

Collapse
benjaminb profile image
Benjamin Bilgehan Author • Edited

SMTP test is successful. now question is forem is installed in docker and where is the .env file exactly ?

forem.dev/remoteimages/uploads/art...

Collapse
ben profile image
Ben Halpern

I suspect that this issue is not DigitalOcean-specific. Not sure what the answer is, but looking forward to finding out.

Collapse
akhil profile image
Akhil Naidu • Edited

The major issue regarding the email was default email-id

First of all, every Forem admin should create their own default email id via the .env file. (no support to configure this via the Forem admin panel)

Secondly and one of the unchecked part by the Admins was, that they are not creating a sender mail based on the above mentioned default email-id; this causes certain issues, like => even though the authentication details were correct, the email-sender-providor, don't know the sender email.

This problem can be removed in two ways, and these two solution are offered by almost every email services provider.

  1. Manually create the sender email
  2. or by verify the domain name.

Within this post, at the end, I added some info on How to resolve SMTP issues, it also contain a 3rd party SMTP testing tool for users to check whether the issue is related to Forem or with the email authentication.

Collapse
ellativity profile image
Ella Ang (she/her/elle)

What @akhil said. @benjaminb is the email address you're using to send/receive via Sendgrid the same as the default_email you set in inventory/forem/setup.yml?

If not, you'll need to follow the steps in Akhil's post to dig into your environment variables, or else make those changes to your setup.yml and re-run the Ansible Playbook to reinstall your Forem with the correct Admin email:

First of all, every Forem admin should create their own default email id via the .env file. (no support to configure this via the Forem admin panel)

This isn't necessary if the correct email is set in Step 6 in the Self-host Quick Start, but you're right that there's no way to make that change from the UI.

Thread Thread
benjaminb profile image
Benjamin Bilgehan Author

I followed Akhil's youtube video to install forem but i have searched "inventory" folder and "forem" folder and also searched "setup.yml" file on my instance no return.

I dont know where to find this files to make correct configuration for ENV file. also there is no .env file setup duirng Akhil's installation video.

Thread Thread
ellativity profile image
Ella Ang (she/her/elle) • Edited

Oh, sorry if that was unclear. I was referring to @akhil 's post here.

Edit: If you didn't use the Forem Self-host instructions to install your Forem, then things might be a little different for you. It's harder for us to offer advice if you're off the beaten path, which is why we try to guide everyone to using our tools as they're currently set up.

Your Forem will have a default_email specified somewhere, so maybe search for that?

Thread Thread
akhil profile image
Akhil Naidu

At the end of the video, you can see I added an ENV variable using the script. In your case the ENV variable for setting email-id was DEFAULT_EMAIL

Collapse
maestromac profile image
Mac Siri

For authentication, can you try "plain" instead of "login" and see if that works?

Collapse
benjaminb profile image
Benjamin Bilgehan Author

nope it does not help.

Collapse
benjaminb profile image
Benjamin Bilgehan Author

I have solved all the issues. I am going to make a video and show how i solved the SMTP issue. I think it would help a lot of people. Wait for it.

Collapse
maartengoddijn profile image
Maarten Goddijn • Edited

Am looking forward to your video. Have exactly the same problem. Thanks in advance!