Email from system not being sent

Hi All I am trying to get the email notifications to work. I am not sure where to find the logs to see why it is failing. I have an external mail server that I am using for some of my wordpress sites. I would like to tlook at the logs to see what is the problem

Thanks

I resolved the issue. This was restictions on my mail server

Could not send email “[Indico] Verify your email” (attempt 1/10); retry in 30s [Connection unexpectedly >
2024-01-16 17:56:26,644 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 2/10); retry in 60s [Connection unexpectedly >
2024-01-16 17:57:20,275 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 2/10); retry in 60s [Connection unexpectedly >
2024-01-16 17:57:56,714 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 3/10); retry in 120s [Connection unexpectedly>
2024-01-16 17:58:50,392 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 3/10); retry in 120s [Connection unexpectedly>
2024-01-16 17:59:38,355 INFO f061dbde3fa34e0d - indico.rh GET /contact [IP=37.99.87.206] [PID=1124]
2024-01-16 18:00:26,815 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 4/10); retry in 300s [Connection unexpectedly>
2024-01-16 18:01:20,474 WARNING 0000000000000000 - indico.emails Could not send email “[Indico] Verify your email” (attempt 4/10); retry in 300s [Connection unexpectedly>

whats the problrm?? i checked up smtp server it works by python. only server cant send…

what i did wrong or i didn’t?

Well, it cannot connect or the connection gets interrupted… we use the same code in Indico that Django uses for sending emails, so this is almost certainly a problem with your (filtered) internet connection (assuming the mail server is not local) or your mail server…

Now i use server internet vps hosting. And use yandex account. Problen in server i guess, have an idea?

We use write this code in python and it works:

import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

# Укажите свои учетные данные и параметры для SMTP-сервера
sender_email = ""
receiver_email = ""
password = ""
smtp_server = "smtp.yandex.kz"
smtp_port = 465

# Создаем объект MIMEMultipart
message = MIMEMultipart()
message["From"] = sender_email
message["To"] = receiver_email
message["Subject"] = "Валидация пользователя"

# Добавляем текст сообщения
body = "Привет, это текст вашего письма."
message.attach(MIMEText(body, "plain"))

try:
    # Устанавливаем соединение с SMTP-сервером
    with smtplib.SMTP_SSL(smtp_server, smtp_port) as server:
        # Входим в аккаунт
        server.login(sender_email, password)

        # Отправляем письмо
        server.sendmail(sender_email, receiver_email, message.as_string())

    print("Письмо успешно отправлено!")

except Exception as e:
    print(f"Произошла ошибка: {str(e)}")

It could connect by smtp in yandex mail server

Do they support STARTTLS (typically on port 587)? If yes try that and set SMTP_USE_TLS = True in your indico.conf.

It alredy wrote

I suspect it is the sender email (this not fixed in indico, it can be the mail configured on the event, the mail of the user triggering the mails, etc…). Yandex probably requires that login email and sender email be the same.