Edit SMTP username

Hey all,

I’ve tried running both: /containers/app.yml and ./discourse-setup to fix my SMTP username but neither seem to work for me

and instead send me to the attached error page.

What am I doing wrong?

Those are command-line paths, not HTTP resource paths.

1 Like

I had tried it in terminal and got the “no directory message” so I assumed it was a path in browser, sorry :sweat_smile:
Would you happen to know which directory I’m meant to run that command in?

/var/discourse, of course. Note that there is no leading slash on containers/app.yml, and that ./discourse-setup is meant to be run, not edited.

1 Like

I’ve opened terminal, run /var/discourse and again “no directory”
Do I need to cd into anything beforehand? Sorry

  

  

2 Likes

How did you install discourse?

Those instructions have you

 cd /var/discourse 
 ./discourse-setup

Unless you did something else to install

2 Likes

I used the DO tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-the-discourse-one-click-application-on-digitalocean

I don’t recall ever cd’ing into /var/discourse

Either search here for the install instructions or all digital Ocean for help.

@tyraniczar I believe the DO one-click install uses Docker containers. Does this thread https://meta.discourse.org/t/how-do-i-change-my-smtp-settings-discourse-docker-install/20067 help you out? I don’t have an instance setup on DO at the moment to try it myself.

note: always make sure you create a snapshot of your droplet before playing with any settings so you have something to revert to if things go wrong :slight_smile:

2 Likes

Nothing has worked so far. Opened a ticket with DO

What version of discourse do you have installed? I am new to Discourse (using Meta to learn it better :slight_smile: ), but not to DO - I’ve been using them for a couple of years. I might be able to find a couple minutes on my lunch to spin up a Discourse droplet and see if I can help you figure it out.

2 Likes

I’m on 2.1.0.beta2 but there’s really no need to waste your lunch on this lol. I was able to access the Ubuntu server via ssh and I ran ./discourse-setup and changed the username but my emails still aren’t being delivered. I guess there’s another issue. Attached is a screenshot of my email config. Is anything missing/incorrect?

Not a waste, curious at heart. But sounds like you are having a different issue than I thought. While I assume you have already found it - it looks like Connecting Mailgun with Digital Ocean deals with your exact combination of setup MailGun + Digital Ocean - though there is a bit to wade through in the discussion. My best guess is after changing the mail config you didn’t reload (./launcher rebuild app)?

edit: actually the last reply may be the most useful to you? Connecting Mailgun with Digital Ocean have you tried using port 2525?

2 Likes

Haha thanks, you are all super helpful. I’ve done the reload twice. I’ll try port 2525 next

2 Likes

Now that I’m not on my phone, I can say that https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md is what you should do to install.

It’s not clear that your port is being blocked, but I always install using port 2525 because Digital Ocean does block outgoing SMTP for lots of their clients and which ones and why is apparently a trade secret.

Thanks, I don’t know if re-installing it would work though. I’ve been able to access and edit my SMTP info via ssh and I ensured that its the same as what I’m using in Discourse. I’ve tried port 2525 and 587 but my emails still aren’t being delivered. Still waiting on ticket @ DO :sleepy:

Next is to check the mail logs of the mail service.

My logs @ Mailgun are empty lol.

Im thinking that the original problem was that my username credential in Discourse was the default user@example.com while the username credential in Mailgun was the correct one. The screenshot is from the tutorial you sent over. Could that have permanently broken email?

you need to run /discourse-setup located in the location where you have clones the discourse application for me I have clones it inr /var/disourse/ so I did
cd /var/discourse
/discourse-setup

this will stop the existing discourse container and then ask the new configuration once everything is set it will rebuild the application