Email not working with 123-reg and discourse on hosted Virtual Private Server - all other aspects appear to

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: -

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

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

And successfully send an email out?

not actually got that far to be fair

im now using

DISCOURSE_SMTP_ADDRESS: smtp.123-reg.co.uk
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: 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.

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

rebuilt the app

now have this in ./doctor-discourse

Testing sending to myemail@mydomain.co.uk using smtp.123-reg.co.uk:465, username:myemail@mydomain.co.uk with true auth.
======================================== ERROR ========================================
UNEXPECTED ERROR

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 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.

2 Likes