# E-mail werkt niet met 123-reg en Discourse op gehoste Virtual Private Server - alle andere aspecten lijken te

**URL:** https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744
**Category:** Self-hosting
**Tags:** email
**Created:** [31 augustus 2022 om 19:33 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744 "2022-08-31T19:33:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bc2018cb](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bc2018cb](https://meta.discourse.org/u/bc2018cb)
#### Post date: [31 augustus 2022 om 19:33 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/1 "2022-08-31T19:33:16Z")

</div>

Hi There

first time user of discourse as an admin. Trying to setup email and no matter what i try its failing

i am editing app.yml then running ./launcher rebuild app

using these settings: -

```plaintext
discourse_smtp_address: "smtp.gmail.com"
discourse_smtp_port:587
discourse_smtp_domain: mydomainname.com
discourse_smtp_user_name = 'myemailaddress@gmail.com'
discourse_smtp_password = 'mypassword'
discourse_smtp_enable_start_tls = true
discourse_smtp_authentication = login

```

or

```plaintext
DISCOURSE_SMTP_ADDRESS: smtp.123-reg.co.uk
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: myemail@mydomainname.co.uk
DISCOURSE_SMTP_AUTHENTICATION: YES
DISCOURSE_SMTP_PASSWORD: mypassword
DISCOURSE_SMTP_ENABLE_START_TLS: Yes

```

both (and numerous) other variations do not work.

i run ./discourse-doctor

i either get

`net::readtimeout`  
or  
something about \_c not known about a command

can i ask if there is anyone who can keep me sane and advise what im doing wrong.

i can telnet into the smtp server from the host.

thankyou in advance

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [31 augustus 2022 om 19:58 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/2 "2022-08-31T19:58:57Z")

</div>

> [@bc2018cb](#):
>
> i can telnet into the smtp server from the host

_And_ successfully send an email out?

---

<div class="post-metadata">

### Author: ![bc2018cb](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bc2018cb](https://meta.discourse.org/u/bc2018cb)
#### Post date: [31 augustus 2022 om 20:02 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/3 "2022-08-31T20:02:00Z")

</div>

not actually got that far to be fair

im now using

DISCOURSE\_SMTP\_ADDRESS: [smtp.123-reg.co.uk](http://smtp.123-reg.co.uk)  
DISCOURSE\_SMTP\_PORT: 465  
DISCOURSE\_SMTP\_USER\_NAME: [myemail@mydomain.co.uk](mailto:myemail@mydomain.co.uk)  
DISCOURSE\_SMTP\_AUTHENTICATION: YES  
DISCOURSE\_SMTP\_PASSWORD: myPasswordwithCharacter#  
DISCOURSE\_SMTP\_ENABLE\_START\_TLS: YES

im getting

Net::SMTPAuthenticationError

i can logon to webmail fine with same password.

---

<div class="post-metadata">

### Author: ![bc2018cb](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bc2018cb](https://meta.discourse.org/u/bc2018cb)
#### Post date: [31 augustus 2022 om 20:06 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/4 "2022-08-31T20:06:30Z")

</div>

Yes telnet smtp on port 25 works. with 123-reg

---

<div class="post-metadata">

### Author: ![bc2018cb](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bc2018cb](https://meta.discourse.org/u/bc2018cb)
#### Post date: [31 augustus 2022 om 20:33 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/5 "2022-08-31T20:33:56Z")

</div>

rebuilt the app

now have this in ./doctor-discourse

Testing sending to [myemail@mydomain.co.uk](mailto:myemail@mydomain.co.uk) using [smtp.123-reg.co.uk:465](http://smtp.123-reg.co.uk:465), [username:myemail@mydomain.co.uk](mailto:username:myemail@mydomain.co.uk) with true auth.  
======================================== ERROR ========================================  
UNEXPECTED ERROR

undefined method `to\_sym’ for true:TrueClass  
Did you mean? to\_s

---

<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: [31 augustus 2022 om 21:07 UTC](https://meta.discourse.org/t/email-not-working-with-123-reg-and-discourse-on-hosted-virtual-private-server-all-other-aspects-appear-to/237744/6 "2022-08-31T21:07:05Z")

</div>

> [@bc2018cb](#):
>
> undefined method `to\_sym’ for true:TrueClass  
> Did you mean? to\_s

~~That sounds like it could be a bug, though it seems improbable that there could be a bug in the mail-sending code.~~

Have a look at [Troubleshooting email on a new Discourse install](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326) for other stuff to try. (like how to do a test without running `discourse-doctor`).

Ah. Here. “YES” is not a valid value for `smtp_validation`:

`Must be plain, login, or cram_md5.`

It’s in `app/services/email_settings_validator.rb` if someone wants to find it on github.
