i have seen a few tutorial that use Gmail account for sending email. 
like this:

http://stackoverflow.com/questions/31324005/django-1-8-sending-mail-using-gmail-smtp

https://www.youtube.com/watch?v=51mmqf5a0Ss
and more.
but tried with yahoo email too . then i changed my settings.py to this:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.mail.yahoo.com'
EMAIL_HOST_USER = 'my_yahoo_account'
EMAIL_HOST_PASSWORD = 'my_password'
EMAIL_PORT = 587

but it steel doesn't work.

On Wednesday, April 19, 2017 at 11:02:12 AM UTC+4:30, Antonis Christofides 
wrote:
>
> Hi,
>
> I may be mistaken, but I think it's not possible to use Gmail as a 
> smarthost if all you have is a free account, and even if it is possible, it 
> is hard to setup. Better try another email provider or with a paid account.
>
> Regards,
>
> A.
>
> Antonis Christofideshttp://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_g...@gmail.com <javascript:>'
> 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_g...@gmail.com <javascript:>',
>         ['shaha...@yahoo.com <javascript:>'],
>         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...@googlegroups.com <javascript:>.
> To post to this group, send email to django...@googlegroups.com 
> <javascript:>.
> 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
>  
> <https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/819b07e0-0035-461d-9ee7-0147311657e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to