horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
154 stars 102 forks source link

Using SMTP error BaseEmailBackend must override send_messages() method #291

Open L1qu1d1c3 opened 3 weeks ago

L1qu1d1c3 commented 3 weeks ago

Bug Report

Description

When I configure my Email server to use Sendgrid's SMTP service, when I try to send a test email, I get the following error: image

However if I run command python manage.py shell and in there I execute the send command like:

from django.core.mail import send_mail
send_mail(
    'Subject here',
    'Here is the message.',
    'to@to.com',
    ['email@email.com'],
    fail_silently=False
)

this works fine and the email is sent.

I updated my settings.py inside horilla to have the following lines, but this doesn't do anything: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.sendgrid.net' EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST_USER = 'apikey' # This is literally the string 'apikey' EMAIL_HOST_PASSWORD = 'my_api_key' DEFAULT_FROM_EMAIL = 'from@domain.com'

vanyell commented 3 weeks ago

there should be a provision to allow regular smtp transaction without SMTP AUTH blockade... I run a postfix server that proxies to Google workspace...

horilla-opensource commented 3 weeks ago

Hi @L1qu1d1c3 , We are unable to reproduce the issue as there issue with sendgrid services in providing the api key. We'll try to override the issue and provide a walkaround for the same.

horilla-opensource commented 3 weeks ago

there should be a provision to allow regular smtp transaction without SMTP AUTH blockade... I run a postfix server that proxies to Google workspace...

Hi @vanyell , The team is looking into this. We'll provide you an update with this.

With Regards, Team Horilla