Seafile won't send email

I followed this to the letter: https://manual.seafile.com/config/sending_email.html

I know my email settings are correct, yet I get the error that the email is wrong or internal server error. I’m on Windows and tried 3 different SMTP servers (one of them Google) and no go.

What am I missing here? Why doesn’t it work?

post how your configuration looks like.

Hi and thanks for your reply!

Here is my seahub_settings.py:

SECRET_KEY =

FILE_SERVER_ROOT = ‘https://mydomain

USE_PDFJS = True

FILE_PREVIEW_MAX_SIZE = 30000000

TEXT_PREVIEW_EXT = “”“ac, am, bat, c, cc, cmake, cpp, cs, css, diff, doc, el, h, html,
htm, java, js, json, less, make, org, php, pl, properties, py, rb,
scala, script, sh, sql, txt, text, tex, vi, vim, xhtml, xml, log, csv,
groovy, rst, patch, go”""

ENABLE_THUMBNAIL = True

THUMBNAIL_IMAGE_SIZE_LIMIT = 30

THUMBNAIL_ROOT = ‘S:/seafile-server/seafile-data/thumbs/’

THUMBNAIL_SIZE_FOR_ORIGINAL = 1024

SITE_NAME = ‘Cloud Drive’

SITE_TITLE = ‘Cloud Drive’

CLOUD_MODE = True

ENABLE_GLOBAL_ADDRESSBOOK = False

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’ : ‘seahub-db’,
‘USER’ : ‘seafile’,
‘PASSWORD’ : ‘xxxxxxx’,
‘HOST’ : ‘127.0.0.1’,
}
}

EMAIL_USE_TLS = True
EMAIL_HOST = ‘mail.mydomain’ # smpt server
EMAIL_HOST_USER = ‘cloud’ # username and domain
EMAIL_HOST_PASSWORD = ‘xxxxx’ # password
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = ‘user@mydomain’
SERVER_EMAIL = ‘user@mydomain’

seafile.conf:

[database]
type=mysql
host=127.0.0.1
user=seafile
password=xxxxxx
db_name=seafile-db

[network]
port = 12001

[fileserver]
port = 8082

[seahub]
port = 8000
fastcgi = false

[fileserver]

Set maximum upload file size to 500M.

max_upload_size=500

Set maximum download directory size to 500M.

max_download_dir_size=500

[quota]

default user quota in GB, integer only

default = 5

please delete your secret key asap!!!

I see you tried with google. Here my config:

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'myname.mysurname@gmail.com'
EMAIL_HOST_PASSWORD = 'myCrAzYPaSSword'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

this is a real example tha works

Thanks, I removed the secret key.

I changed my config to this:

EMAIL_USE_TLS = True
EMAIL_HOST = ‘smtp.gmail.com’ # smpt server
EMAIL_HOST_USER = ‘myuser@gmail.com’ # username and domain
EMAIL_HOST_PASSWORD = ‘mypassword’ # password
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

And I still get this error:
Internal server error, or please check the email(s) you entered

I also tried with my own smtp server and I get the exact same thing. I also tried with a non-TLS smtp server and got the same error.

check that after every end of line, there is no hidden blank space. ie after True[X]. Because for me works in this way. I assume without the mail block, seafile works well, isn’t it?

No, I don’t have any extra spaces in the configuration. I am using Seafile on Windows.

The rest of the program works great, just sending email doesn’t work. And there’s nothing in the log files either which makes it even harder to troubleshoot.

Well, I ended up using another unsecured email server and it worked!!!
It seems that Seafile on Windows doesn’t like using TLS. Unsecured worked fine.

I also tried authenticating with my Exchange server and that didn’t work either. Seems Seafile doesn’t like Exchange whether or not it’s secured with SSL as I tried both.