try https://www.mailgun.com if you don't want to host your own smtp server
On 20 April 2017 at 09:57, Antonis Christofides <anto...@djangodeployment.com> wrote: > You might also want to read this article of mine, which might give you lots > of ideas about what could be wrong: Why does Django not email me the 500 > internal server error? > > Regards, > > A. > > Antonis Christofides > http://djangodeployment.com > > On 2017-04-19 00:25, shahab emami wrote: > > hello > > i want to send email using django. i used to send email with pour python > before but now i can't do that in django. > > i have search about this and i have seen some tutorials on youtube in last > two days but i cant do this . > > this is in my settings.py : > > EMAIL_USE_TLS = True > EMAIL_HOST = 'smtp.gmail.com' > EMAIL_HOST_USER = 'my_gm...@gmail.com' > EMAIL_HOST_PASSWORD= 'my_password' > EMAIL_PORT = 587 > > and this is my send email: > > from django.core.mail import send_mail > def click(request): > send_mail( > 'shahab', > 'Here is the message.', > 'my_gm...@gmail.com', > ['shahabem...@yahoo.com'], > fail_silently=True > ) > return HttpResponseRedirect('index') > > but it doesn't work. > > I am running this code on localhost. but i doesn't work on heroku too. > i changed allow less secure app to on in my gmail account and > i went to this page too and i clicked on continue : > https://accounts.google.com/DisplayUnlockCaptcha > > can anybody tell me: > what am i missing ? > > > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/82fe4c4f-91c8-8cf0-b8b9-2f1d4d8cb75c%40djangodeployment.com. > > For more options, visit https://groups.google.com/d/optout. -- Best Regards, Christian Ledermann Newark-on-Trent - UK Mobile : +44 7474997517 https://uk.linkedin.com/in/christianledermann https://github.com/cleder/ <*)))>{ If you save the living environment, the biodiversity that we have left, you will also automatically save the physical environment, too. But If you only save the physical environment, you will ultimately lose both. 1) Don’t drive species to extinction 2) Don’t destroy a habitat that species rely on. 3) Don’t change the climate in ways that will result in the above. }<(((*> -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABCjzWqnMe94BWBCaKcR%3DJMjktJXMx5aK2a1iZ5%3DZTAsowK1yQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.