אימייל לא עובד עם 123-reg ו-discourse על שרת וירטואלי פרטי מאוחסן - כל שאר ההיבטים נראים תקינים

סיכום מבוסס בינה מלאכותית

A new Discourse admin, bc2018cb, is struggling to configure email on a hosted VPS using 123-reg’s SMTP server. Despite multiple configuration attempts — including Gmail and 123-reg settings — email fails with errors like Net::SMTPAuthenticationError or undefined method 'to_sym' for true:TrueClass during ./discourse-doctor tests. Richie questions whether telnet success translates to actual email sending, to which bc2018cb confirms telnet on port 25 works but email still fails. The issue appears tied to invalid SMTP authentication values — specifically using YES instead of valid options like plain, login, or cram_md5 — as noted by pfaffman. pfaffman also suggests reviewing Troubleshooting email on a new Discourse install for alternative testing methods. The user can log into webmail with the same credentials, indicating the issue is likely configuration-related rather than credential-based. The to_sym error may point to a code-level bug or misinterpretation of boolean/string values in the email validator. The thread remains unresolved but highlights a common misconfiguration pitfall with 123-reg SMTP settings.

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.