Python / Django: sending emails resulting in 535 (gmail working)

0

I have a contact form where I send the message to the system administrator informing you about it. The email configuration information is fully verified and correct.

EMAIL_HOST='mail.xxx.net'
EMAIL_HOST_USER='[email protected]'
EMAIL_HOST_PASSWORD='xxx'
EMAIL_PORT='25'

To send the form I have a script in AJAX, which performs the e-mail trigger function. The following error is returned:

SMTPAuthenticationError at /vendas/contato/
(535, 'Incorrect authentication data')
Request Method: POST
Request URL:    http://xxx.net/vendas/contato/
Django Version: 1.3
Exception Type: SMTPAuthenticationError
Exception Value:    
(535, 'Incorrect authentication data')
Exception Location: /usr/local/lib/python2.7/smtplib.py in login, line 622
Python Executable:  /usr/bin/python
Python Version: 2.7.9
Python Path:    
['/home/xxx/pythonenv/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/site-packages/setuptools-12.1-py2.7.egg',
 '/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg',
 '/usr/local/lib/python27.zip',
 '/usr/local/lib/python2.7',
 '/usr/local/lib/python2.7/plat-linux2',
 '/usr/local/lib/python2.7/lib-tk',
 '/usr/local/lib/python2.7/lib-old',
 '/usr/local/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/site-packages',
 '/home/xxx/pythonenv/lib/python2.7/site-packages',
 '/home/xxx/src/myproject']
Server time:    Seg, 26 Set 2016 17:08:45 -0300

After some tests, I noticed that when inserting a gmail email for example, email is sent normally, other domains such as xxx.net or yyy.com.br result in error 535 .

Does anyone have any idea what might be causing this?

    
asked by anonymous 26.09.2016 / 22:19

1 answer

0

This is an authentication error for your SMTP service.

Do not just put another host domain and another user and you're done. You have to look at the documentation for the new smtp service, see what is the host address and port to use.

    
28.09.2016 / 20:28