Hi
-- I use this settings to send email:
settings.py
EMAIL_HOST = "mail.xxxxxx.ir"
EMAIL_PORT = "25"
EMAIL_HOST_USER = "xxxxx@xxx.ir"
EMAIL_HOST_PASSWORD = "xxxxxxxx"
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = 'xxxxx@xxx.ir'
and in python shell:
from django.core.mail import send_mail
send_mail('test', 'hello', 'xxxxx@xxx.ir', ['myEmail@gmail.com'])
And its successfully sent But when i use that two line code in view, i got this error:
gaierror at /userforget/
[Errno -3] Temporary failure in name resolutionPlease help me.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6aaaeaac-dc68-477a-b2d7-7b2821097c36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment