# DISCOURSE\_SMTP\_PASSWORD change failed

**URL:** https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441
**Category:** Self-hosting
**Created:** [December 5, 2017, 3:00pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441 "2017-12-05T15:00:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Pravi7434](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@Pravi7434](https://meta.discourse.org/u/Pravi7434)
#### Post date: [December 5, 2017, 3:00pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/1 "2017-12-05T15:00:11Z")

</div>

Hello,

I got above mentioned error while installing discourse on aws ec2. The problem was with my SES smtp password ( AmQ/22sNDN2Bg5vS+zH3IDfy+lfmF3OgGg/CnsAZMg90 ). Later I changed the password to one without any special characters and it worked. I am not sure its a bug or discourse wont encourage password with special characters. I thought I have to inform.

Regards

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [December 5, 2017, 4:27pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/2 "2017-12-05T16:27:12Z")

</div>

Did you put quotes around your password when editing the `app.yml` file?

---

<div class="post-metadata">

### Author: ![Pravi7434](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@Pravi7434](https://meta.discourse.org/u/Pravi7434)
#### Post date: [December 5, 2017, 4:52pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/3 "2017-12-05T16:52:03Z")

</div>

@zogstrip No, I didn’t put any quotes around the password.I simply copied and pasted the password into the app.yml. Actually this is not the first time I am installing discourse. This error happens to me today, when I am trying to have a fresh discourse install.

---

<div class="post-metadata">

### Author: ![MakaryGo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/makarygo/32/187426_2.png) [@MakaryGo](https://meta.discourse.org/u/MakaryGo)
#### Post date: [December 5, 2017, 4:56pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/4 "2017-12-05T16:56:17Z")

</div>

And that’s probably the cause.If you have some special characters, you should encase it in the quotes, so that Discourse _knows_ where it begins and ends.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [December 5, 2017, 5:00pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/5 "2017-12-05T17:00:13Z")

</div>

> [@zogstrip](#):
>
> Did you put quotes around your password when editing the app.yml file?

It’s a bug/limitation in `./discourse-setup`. It doesn’t properly escape passwords before asking `sed` to do the replacement.

One solution would be to check the password for a set of delimiters before doing the replacement and then choose the replacement delimiter accordingly.

Another would be to check for a slash in the password and punt, then tell them to change the password or edit `app.yml` by hand.

I’ll add this to my TODO list of improvements to discourse-setup.

> [@Pravi7434](#):
>
> No, I didn’t put any quotes around the password.I simply copied and pasted the password into the app.yml.

Oh. I was wrong.

I’ll add putting quotes around the password in `samples/standalone.yml` to my list as well. 😉 I’ve got a couple other yml updates I have been wanting to do as well.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 5, 2017, 9:51pm UTC](https://meta.discourse.org/t/discourse-smtp-password-change-failed/75441/6 "2017-12-05T21:51:46Z")

</div>

> [@pfaffman](#):
>
> One solution would be to check the password for a set of delimiters before doing the replacement and then choose the replacement delimiter accordingly.
> 
> Another would be to check for a slash in the password and punt, then tell them to change the password or edit app.yml by hand.

Whatever is easiest to do, is best here..
