when i am trying to send mails through django I am getting the above error . Can you please tell the cause of this error and how to avoid it?
25 Answers
The cause is that the SMTP server is refusing some of the recipients you're sending email to. The fix is either to not send email to those recipients, to reconfigure the SMTP server to accept them, or to find a different SMTP server to use.
Your mail server isn't allowed to send mail. The likelyhood of this having anything to do with Django is small. Check your mailserver settings and whether your provider will allow you sending mail.
2I don't know if '192.168.10.1' is the IP of a mail server or not, but you need to set EMAIL_HOST to a mail server. If you have a gmail account, you can send emails through your account using Google's smtp server for free. Here's how you configure your settings.py
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'your gmail account' eg [email protected]EMAIL_HOST_PASSWORD = 'your gmail password'Here's a list of other smtp servers you could use, but i recommend using Google's
NB: Some may not be free
I installed sendmail and followed this SO post to configure it.
I had the same issue. In my case, just created this in settings:
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER