9

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?

prateek
  • 119
  • 1
  • 1
  • 2
  • I am getting this error randomly, using Sendgrid. Retrying usually works — which is weird … – antonagestam Jul 19 '13 at 12:45
  • possible duplicate of [Error: SMTPRecipientsRefused 553, '5.7.1 #while working on contact form in django](http://stackoverflow.com/questions/9281334/error-smtprecipientsrefused-553-5-7-1-while-working-on-contact-form-in-djang) – Vaibhav Mule May 09 '15 at 12:21

5 Answers5

5

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.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0

I 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 xxxxx@gmail.com
EMAIL_HOST_PASSWORD = 'your gmail password'

Here's a list of other smtp servers you could use, but i recommend using Google's

SMTP-Servers

NB: Some may not be free

SamAko
  • 3,485
  • 7
  • 41
  • 77
0

I installed sendmail and followed this SO post to configure it.

Community
  • 1
  • 1
E-rich
  • 9,243
  • 11
  • 48
  • 79
0

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.

Exelian
  • 5,749
  • 1
  • 30
  • 49
  • where do these settings reside? – prateek Apr 12 '11 at 10:46
  • The settings or for your SMTP server. Are you currently running any mail servers? If you don't know, can you post what is in your `EMAIL_HOST` setting in `settings.py`? – Exelian Apr 12 '11 at 10:49
0

I had the same issue. In my case, just created this in settings:

DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
Rafael Zottesso
  • 1,554
  • 2
  • 10
  • 10