# Changing "send-from" e-mail address

**URL:** https://meta.discourse.org/t/changing-send-from-e-mail-address/299666
**Category:** Self-hosting
**Tags:** email
**Created:** [March 16, 2024, 8:26pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666 "2024-03-16T20:26:14Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 16, 2024, 8:26pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/1 "2024-03-16T20:26:15Z")

</div>

I have run `./discourse-setup` to change my smtp settings.  
I’m not completely clear on which setting will set my “send-from” or “reply-to” address.  
I have one e-mail address for the smtp login, but I’d like the e-mails to appear to come from (reply-to) a different e-mail address (Basically a `no-reply@my-forum.com` style address)

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [March 16, 2024, 8:40pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/2 "2024-03-16T20:40:38Z")

</div>

You’re looking for `DISCOURSE_NOTIFICATION_EMAIL` in your `containers/app.yml`.

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 16, 2024, 10:44pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/3 "2024-03-16T22:44:49Z")

</div>

That seems to kill my discourse. I had to restore the web site as there was no way to get it running after simply changing that one line.

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [March 17, 2024, 9:51am UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/4 "2024-03-17T09:51:43Z")

</div>

This sounds very esoteric, especially without any details.

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 17, 2024, 1:57pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/5 "2024-03-17T13:57:10Z")

</div>

Steps to reproduce:

1. Discourse working fine
2. Edit `app.yml`, changing the one line exactly as suggested
3. Run `./launcher rebuild app` (always takes a very long time)
4. Rebuild fails and forum is down.
5. Run `./discourse-doctor`
6. Fails to fix.
7. Restore web site from backup to state before edit of `app.yml` and it’s working again.

I tried it twice but forgot to export the logs/output before restoring the web site so I’ll leave it for now until I have more time if I feel like trying again.

---

<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: [March 18, 2024, 9:46am UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/6 "2024-03-18T09:46:11Z")

</div>

Do you have any non standard plugins?

How much memory do you have?

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 18, 2024, 11:15pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/7 "2024-03-18T23:15:41Z")

</div>

Not quite sure what you mean?

---

<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: [March 22, 2024, 1:24pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/8 "2024-03-22T13:24:45Z")

</div>

Sorry. I was careless on my phone.

You are probably out of memory. What does

```plaintext
free -h

```

tell you?

You likely can add more swap (or RAM)

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 22, 2024, 9:21pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/9 "2024-03-22T21:21:53Z")

</div>

```plaintext
root@DO-Discourse:~# free -h
              total used free shared buff/cache available
Mem: 965Mi 705Mi 72Mi 16Mi 187Mi 91Mi
Swap: 2.0Gi 17Mi 2.0Gi
root@DO-Discourse:~# 

```

---

<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: [March 22, 2024, 9:25pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/10 "2024-03-22T21:25:52Z")

</div>

You can add more RAM or more swap. You can try something like this to add swap, though I didn’t test it:

```plaintext
install -o root -g root -m 0600 /dev/null /swapfile2
fallocate -l 2G /swapfile2
mkswap /swapfile2
swapon /swapfile2
echo "/swapfile2 swap swap auto 0 0" | tee -a /etc/fstab

```

The other option is to make one bigger swap file.

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [March 22, 2024, 9:30pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/11 "2024-03-22T21:30:14Z")

</div>

There’s 2gig free, do you really think it needs more?  
I think I’ll leave it until the next time I get time to try again. Then I’ll copy the logs if it doesn’t succeed. I would think the answer will be in those logs somewhere.

---

<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: [March 22, 2024, 9:36pm UTC](https://meta.discourse.org/t/changing-send-from-e-mail-address/299666/12 "2024-03-22T21:36:21Z")

</div>

> [@AndyBr](#):
>
> - Rebuild fails and forum is down.

You didn’t include logs, but they probably show that it failed due to lack of memory. When the rebuild fails, you can (usually) start it again with `./launcher start app`.

It’s unlikely that adding that ENV would make Discourse not work. If you messed up the formatting (which is unilkely since you got discourse-setup to make the changes), it wouldn’t take a long time.

You have lots of memory free now, but the rebuild takes a lot of memory.

If you’re changing just `DISCOURSE_NOTIFICATION_EMAIL` you can edit it with `nano` and

```plaintext
./launcher destroy app
./launcher start app

```
