Update the incorrect syntax in the manual for email settings

There doesn’t seem to be a place for bugs, so I thought I should “request” it.
The syntax seems to be incorrect. I would post the exact page, but I can’t post links. It is listed as:
(only final 2 lines listed because of “Can’t post links”
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

and the last 2 entries should also be encased in single quotes to be as follows:

DEFAULT_FROM_EMAIL = ‘EMAIL_HOST_USER’
SERVER_EMAIL = ‘EMAIL_HOST_USER’

I am assuming this is an error on the website, as seafile failed to start until I updated the syntax.

this doesn’t look like an error, if you quote EMAIL_HOST_USER you make a string out of what is supposed to be a variable. did you define EMAIL_HOST_USER earlier in the config file?

Ah… No I did not. The directions in the official documentation just said to add that to the file (well gave me a whole bunch of things to add, and I can’t post it, or the page here, because I can’t post links) and didn’t say anything I can recall about defining the variables. So I assume they were designed to be strings.
So if the error isn’t in that example, the page should include the example to define the variables. Again, unless I totally missed it (And it is possible)

in the official manual it says “Please add the following lines to seahub_settings.py to enable email sending”:

EMAIL_USE_TLS = False
EMAIL_HOST = 'smtp.example.com'        # smpt server
EMAIL_HOST_USER = 'username@example.com'    # username and domain
EMAIL_HOST_PASSWORD = 'password'    # password
EMAIL_PORT = 25
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

you can and should of course use different values for DEFAULT_FROM_EMAIL and SERVER_EMAIL if they are not suposed to be identical to EMAIL_HOST_USER. for instance, if you don’t use an email address but a user name to authenticate against the SMTP server. these are just examples.

i would strongly advice the use of EMAIL_USE_TLS = True though. at least within the EU you should always use transport encryption to comply with GDPR.