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

Asked

Viewed 91 times

1

I have a contact form where I send the message to the system administrator informing him about it. 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 executes the function of triggering the email. 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 a few tests, I checked that when entering an email from gmail for example, email is normally sent, other domains such as xxx.net or yyy.com.br result in error 535.

Does anyone have any idea what might be causing this?

1 answer

1

This is your smtp service authentication error.

It’s not just putting in another host domain and another user and that’s it. You have to look at the documentation of the new smtp service, see what is the host address and the port to be used.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.