# Emails not sending properly

**URL:** https://meta.discourse.org/t/emails-not-sending-properly/214943
**Category:** Self-hosting
**Created:** [January 15, 2022, 1:11pm UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943 "2022-01-15T13:11:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Inobservatus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inobservatus/32/246433_2.png) [@Inobservatus](https://meta.discourse.org/u/Inobservatus)
#### Post date: [January 15, 2022, 1:11pm UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943/1 "2022-01-15T13:11:23Z")

</div>

So I’ve got everything set up except my email, and it’s just returning this very basic error I can’t figure out how to fix.

```plaintext
  Rendered layouts/email_template.html.erb (Duration: 0.2ms | Allocations: 30)
Delivered mail d8a282d1-d293-4f95-b613-de340fb94bdb@banlist.inobservatus.xyz (465.2ms)
Job exception: SSL_connect returned=1 errno=0 state=error: sslv3 alert handshake failure

```

---

<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: [January 16, 2022, 1:57am UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943/2 "2022-01-16T01:57:38Z")

</div>

It looks like the ssl certificate for your mail server is invalid. Can you fix that?

---

<div class="post-metadata">

### Author: ![Inobservatus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inobservatus/32/246433_2.png) [@Inobservatus](https://meta.discourse.org/u/Inobservatus)
#### Post date: [January 16, 2022, 1:10pm UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943/3 "2022-01-16T13:10:20Z")

</div>

I have no clue how to do this.

My VPS is routed through my webserver. Do I need to add the SSL on the website or on the VPS? (I’m using DigitalOcean)

Also, for the SMTP username and password - is that just a username and password for one of the emails on my domain?

Unrelated, but the email has the format [system@example.com](mailto:system@example.com). Do I need to change anything since its not on [discourse.example.com](http://discourse.example.com)?

---

<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: [January 16, 2022, 3:39pm UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943/4 "2022-01-16T15:39:56Z")

</div>

> [@Inobservatus](#):
>
> - is that just a username and password for one of the emails on my domain?

Maybe it’s a little hard to guess as there are many ways your mail server might be configured. If sounds like it is accessible via many host name but only one has a valid certificate.

If you run discourse-setup it’ll prompt you for the sending address.

---

<div class="post-metadata">

### Author: ![Inobservatus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/inobservatus/32/246433_2.png) [@Inobservatus](https://meta.discourse.org/u/Inobservatus)
#### Post date: [January 16, 2022, 5:24pm UTC](https://meta.discourse.org/t/emails-not-sending-properly/214943/5 "2022-01-16T17:24:38Z")

</div>

I got the SSL set up. What would the SMTP username and password be for a normal installation?

I’m still getting the SSL error in the first post so I’m unsure if that is related to the mailserver’s certificate or the VPS’s.
