How can I replace the smtp server configured in discourse?

hi.
I installed the open source discourse on digitalOcean hosting server. The smtp server used Mailgun Free ver.
The mailgun Free ver. smtp installed on discourse is not sending mail, so I want to change the smtp server.

How can I replace the smtp server installed in discourse?

1 Like

Assuming you followed the standard install, the SMTP settings used during discourse setup are stored in the app.yml

Look in /var/discourse/containers

After editing that file you can either run a rebuild from the terminal, or the shorter:

./launcher destroy app && ./launcher start app

2 Likes

Thank you for your response.

But I don’t know the programming language very well.
I know it’s a hassle, but if you could tell me how to edit the app.yml file and the path to access the file, I’d appreciate it.

If you did a standard install, you could do something like this:

cd /var/disourse
nano containers/app.yml

If you don’t know what nano is or how to use it, you’ll need to use Google.

1 Like

Thank you for your answer.

Did that work? You can also just run discourse-setup again.

2 Likes

Thank you for your interest. I haven’t tried it yet. I haven’t found any smtp servers that can replace Mailgun, I’ll have to look around a bit more.

I recommend that you get mailgun configured properly. It’s one of the easier ones.

2 Likes

Thanks for your response.

Hi.
I accessed the containers.yml with the command you gave me below.

cd /var/disourse
nano containers/app.yml

After that, I need to edit it to change the SMTP server, but I don’t know how to edit file. If it’s not too much trouble, please let me know how to do it.

If you don’t know how to use nano you can Google for that. Also

2 Likes

I googled how to use the nano command. I got a rough idea of how to use the command. However, I don’t know which commands to modify in app.yml and how.

I’m afraid that explaining how to use software that has nothing to do with Discourse is usually out of the scope of this forum. If you have trouble and a budget, you can post in marketplace. :slight_smile:

That said, I agree with pfaffman, likely Mailgun wasn’t properly configured (many people use it for Discourse with no troubles) or app.yml wasn’t properly filled in. I’d look at both, and as for changing SMTP settings, as pfaffman said a few times, you can also run ./discourse-setup, which will lead to the software’s configuration step by step.

If what you want to do is change the SMTP settings you can

cd /var/discourse
./discourse-setup

and it’ll let you change the settings and rebuild when you’re done

FYI I’ve changed the title, as no SMTP server is “installed”.

3 Likes

cd /var/discourse
./discourse-setup

I reinstalled smtp with ./discourse-setup as you told me. Thank you so much.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.