# Mailhog not receiving Discourse emails

**URL:** https://meta.discourse.org/t/mailhog-not-receiving-discourse-emails/314004
**Category:** Self-hosting
**Created:** [June 27, 2024, 4:05pm UTC](https://meta.discourse.org/t/mailhog-not-receiving-discourse-emails/314004 "2024-06-27T16:05:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![luigi7up](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luigi7up/32/477213_2.png) [@luigi7up](https://meta.discourse.org/u/luigi7up)
#### Post date: [June 27, 2024, 4:05pm UTC](https://meta.discourse.org/t/mailhog-not-receiving-discourse-emails/314004/1 "2024-06-27T16:05:57Z")

</div>

Hello,

I’m setting up Discourse on my MacBook (M2) to try it out before hosting it elsewhere. I’ve cloned the repository and configured `app.yml` to use Mailhog:

```yaml
env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8

  DISCOURSE_HOSTNAME: 'localhost'
  DISCOURSE_DEVELOPER_EMAILS: 'luigi7up@gmail.com'

  DISCOURSE_SMTP_ADDRESS: localhost
  DISCOURSE_SMTP_PORT: 1025
  DISCOURSE_SMTP_USER_NAME: ''
  DISCOURSE_SMTP_PASSWORD: ''
  DISCOURSE_SMTP_ENABLE_START_TLS: false
  SMTP_URL: localhost
  DISCOURSE_SMTP_AUTHENTICATION: none

```

I start Discourse using the launcher and access it at `localhost:80`. Concurrently, I run Mailhog via Docker:

```bash
docker pull mailhog/mailhog
docker run -d -p 1025:1025 -p 8025:8025 mailhog/mailhog

```

Mailhog’s UI is accessible at `localhost:8025`, and testing with a Ruby script confirms emails are received by Mailhog:

```ruby
Mail.defaults do
  delivery_method :smtp, address: "localhost", port: 1025
end

```

However, when I register on Discourse, no emails are sent. I’ve checked the Docker container logs without finding any relevant entries.

Any suggestions on resolving this issue?

Thank you!
