Quantcast

send email with django

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

send email with django

shahab emami
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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Antonis Christofides-2

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 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
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/f9be092f-37ab-021f-2785-9fdd8f5d3f4c%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Jani Tiainen
In reply to this post by shahab emami

Have you enabled app in Google mail account?

You can do that through url https://accounts.google.com/DisplayUnlockCaptcha

On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 [hidden email].
To post to this group, send email to [hidden email].
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.

-- 
Jani Tiainen

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/653338d1-89ff-f74b-e714-e7274055d1ac%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Jani Tiainen
In reply to this post by shahab emami

Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 [hidden email].
To post to this group, send email to [hidden email].
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.

-- 
Jani Tiainen

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Carl-2
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '[hidden email]'
ADMINS = [('MyWebServer', '[hidden email]'),]

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '[hidden email]'
DEFAULT_TO_EMAIL = '[hidden email]'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 :

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 [hidden email].
To post to this group, send email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
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/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

shahab emami
In reply to this post by Antonis Christofides-2
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 Christofides
<a href="http://djangodeployment.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdjangodeployment.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG4iyqeqE2YgL6I04mpOnaxWJQ83g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdjangodeployment.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG4iyqeqE2YgL6I04mpOnaxWJQ83g&#39;;return true;">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 = '<a href="http://smtp.gmail.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://smtp.gmail.com&#39;;return true;" onclick="this.href=&#39;http://smtp.gmail.com&#39;;return true;">smtp.gmail.com'
EMAIL_HOST_USER = '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="pNagABwiAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">my_g...@...'
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.',
        '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="pNagABwiAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">my_g...@...',
        ['<a href="javascript:" target="_blank" gdf-obfuscated-mailto="pNagABwiAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">shaha...@...'],
        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 :
<a href="https://accounts.google.com/DisplayUnlockCaptcha" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;" onclick="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pNagABwiAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pNagABwiAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To post to this group, send email to [hidden email].
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Thiago Parolin
In reply to this post by Carl-2
i am using sendgrid for send emails...the free service works very well for me...there is a paid version too..
sendgrid can be integrated into django

https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl <[hidden email]>:
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '[hidden email]'
ADMINS = [('MyWebServer', '[hidden email]'),]

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '[hidden email]'
DEFAULT_TO_EMAIL = '[hidden email]'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 :

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 [hidden email].
To post to this group, send email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
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/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.

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 [hidden email].
To post to this group, send email to [hidden email].
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/CACTnJ01GT_GjMQhYyG3nSGV9Y9wDcDzhYpxaGt3eiBGZviWxcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

shahab emami
but it's free for 30 days. what i have to do after 30 days?

On Wednesday, April 19, 2017 at 6:18:38 PM UTC+4:30, Thiago Luiz Parolin wrote:
i am using sendgrid for send emails...the free service works very well for me...there is a paid version too..
sendgrid can be integrated into django

<a href="https://sendgrid.com/docs/Integrate/Frameworks/django.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsendgrid.com%2Fdocs%2FIntegrate%2FFrameworks%2Fdjango.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNET4MxsPyZQRPFzm5tD2Yi4jKYdzw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsendgrid.com%2Fdocs%2FIntegrate%2FFrameworks%2Fdjango.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNET4MxsPyZQRPFzm5tD2Yi4jKYdzw&#39;;return true;">https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pyt...@...>:
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google
  <a href="https://support.google.com/a/answer/2956491?hl=en" target="_blank" onmousedown="this.href=&#39;https://support.google.com/a/answer/2956491?hl\x3den&#39;;return true;" onclick="this.href=&#39;https://support.google.com/a/answer/2956491?hl\x3den&#39;;return true;">https://support.google.com/a/answer/2956491?hl=en

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">myn...@...'
ADMINS = [('MyWebServer', '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">myn...@...'),]

EMAIL_USE_TLS = True
EMAIL_HOST = '<a href="http://smtp-relay.gmail.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://smtp-relay.gmail.com&#39;;return true;" onclick="this.href=&#39;http://smtp-relay.gmail.com&#39;;return true;">smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">myn...@...'
DEFAULT_TO_EMAIL = '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">myn...@...'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM
From: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">red...@...
To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@...


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '<a href="http://smtp.gmail.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://smtp.gmail.com&#39;;return true;" onclick="this.href=&#39;http://smtp.gmail.com&#39;;return true;">smtp.gmail.com'
EMAIL_HOST_USER = '<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">my_g...@...'
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.',
        '<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">my_g...@...',
        ['<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">shaha...@...'],
        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 :
<a rel="nofollow" href="https://accounts.google.com/DisplayUnlockCaptcha" target="_blank" onmousedown="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;" onclick="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;">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 <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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 <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="791d4ew5AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To post to this group, send email to [hidden email].
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/2a63b15e-3218-4bb0-91ed-624ec2a87df1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

sum abiut
I am also using sendgrid it works very well.

On Thu, Apr 20, 2017 at 6:56 AM, shahab emami <[hidden email]> wrote:
but it's free for 30 days. what i have to do after 30 days?

On Wednesday, April 19, 2017 at 6:18:38 PM UTC+4:30, Thiago Luiz Parolin wrote:
i am using sendgrid for send emails...the free service works very well for me...there is a paid version too..
sendgrid can be integrated into django

https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl <[hidden email]>:
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '[hidden email]'
ADMINS = [('MyWebServer', '[hidden email]'),]

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '[hidden email]'
DEFAULT_TO_EMAIL = '[hidden email]'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 :

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 [hidden email]om.
To post to this group, send email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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 [hidden email]om.
To post to this group, send email to [hidden email].
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 [hidden email]om.
To post to this group, send email to [hidden email].
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/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.

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 [hidden email].
To post to this group, send email to [hidden email].
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/2a63b15e-3218-4bb0-91ed-624ec2a87df1%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 [hidden email].
To post to this group, send email to [hidden email].
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/CAPCf-y6wrgqe-aN69tNDpp1mvmjji%2BWvw4X0X87nBK6ofpp1Fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

shahab emami
but that doesn't work for me too.

i sign up in sendgrid and this is my new settings.py

EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'my_account'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

not on localhost and not on heroku


On Thursday, April 20, 2017 at 1:38:53 AM UTC+4:30, suabiut wrote:
I am also using sendgrid it works very well.

On Thu, Apr 20, 2017 at 6:56 AM, shahab emami <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="BMEYP_NRAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">royar...@...> wrote:
but it's free for 30 days. what i have to do after 30 days?

On Wednesday, April 19, 2017 at 6:18:38 PM UTC+4:30, Thiago Luiz Parolin wrote:
i am using sendgrid for send emails...the free service works very well for me...there is a paid version too..
sendgrid can be integrated into django

<a href="https://sendgrid.com/docs/Integrate/Frameworks/django.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsendgrid.com%2Fdocs%2FIntegrate%2FFrameworks%2Fdjango.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNET4MxsPyZQRPFzm5tD2Yi4jKYdzw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsendgrid.com%2Fdocs%2FIntegrate%2FFrameworks%2Fdjango.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNET4MxsPyZQRPFzm5tD2Yi4jKYdzw&#39;;return true;">https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl <[hidden email]>:
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google
  <a href="https://support.google.com/a/answer/2956491?hl=en" target="_blank" onmousedown="this.href=&#39;https://support.google.com/a/answer/2956491?hl\x3den&#39;;return true;" onclick="this.href=&#39;https://support.google.com/a/answer/2956491?hl\x3den&#39;;return true;">https://support.google.com/a/answer/2956491?hl=en

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '[hidden email]'
ADMINS = [('MyWebServer', '[hidden email]'),]

EMAIL_USE_TLS = True
EMAIL_HOST = '<a href="http://smtp-relay.gmail.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://smtp-relay.gmail.com&#39;;return true;" onclick="this.href=&#39;http://smtp-relay.gmail.com&#39;;return true;">smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '[hidden email]'
DEFAULT_TO_EMAIL = '[hidden email]'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '<a href="http://smtp.gmail.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://smtp.gmail.com&#39;;return true;" onclick="this.href=&#39;http://smtp.gmail.com&#39;;return true;">smtp.gmail.com'
EMAIL_HOST_USER = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 :
<a rel="nofollow" href="https://accounts.google.com/DisplayUnlockCaptcha" target="_blank" onmousedown="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;" onclick="this.href=&#39;https://accounts.google.com/DisplayUnlockCaptcha&#39;;return true;">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.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/django-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/65e0ab09-ff5a-4ed5-89d6-e5e0991b9ea0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/django-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/6a7f0307-4144-b649-cdc8-8e679e89ceca%40gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/django-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.

For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="BMEYP_NRAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="BMEYP_NRAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/2a63b15e-3218-4bb0-91ed-624ec2a87df1%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/2a63b15e-3218-4bb0-91ed-624ec2a87df1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/2a63b15e-3218-4bb0-91ed-624ec2a87df1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/2a63b15e-3218-4bb0-91ed-624ec2a87df1%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To post to this group, send email to [hidden email].
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/1e07f162-8c8c-4133-91b2-a3f6e7e00c7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

sum abiut
Have you install the sendgrid backend?

what is the error message you are getting


On Thu, Apr 20, 2017 at 8:48 AM, shahab emami <[hidden email]> wrote:
but that doesn't work for me too.

i sign up in sendgrid and this is my new settings.py

EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'my_account'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

not on localhost and not on heroku


On Thursday, April 20, 2017 at 1:38:53 AM UTC+4:30, suabiut wrote:
I am also using sendgrid it works very well.

On Thu, Apr 20, 2017 at 6:56 AM, shahab emami <[hidden email]> wrote:
but it's free for 30 days. what i have to do after 30 days?

On Wednesday, April 19, 2017 at 6:18:38 PM UTC+4:30, Thiago Luiz Parolin wrote:
i am using sendgrid for send emails...the free service works very well for me...there is a paid version too..
sendgrid can be integrated into django

https://sendgrid.com/docs/Integrate/Frameworks/django.html




2017-04-19 8:46 GMT-03:00 Carl <[hidden email]>:
As a counter-perspective, we have this working with a paid G Suite (formerly Google Apps) account. *Important* We had to register the IP address of our server with G Suite. This Google support document outlines the process:
  SMTP relay: Route outgoing non-Gmail messages through Google

In terms of Django, our settings.py file has the following relevant settings:

# To have error messages auto-sent via email:
SERVER_EMAIL = '[hidden email]'
ADMINS = [('MyWebServer', '[hidden email]'),]

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp-relay.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = '[hidden email]'
DEFAULT_TO_EMAIL = '[hidden email]'

Hope this helps!

-------- Original Message --------
Subject: Re: send email with django
Local Time: April 19, 2017 7:00 AM
UTC Time: April 19, 2017 11:00 AM


Also, don't fail silently it would be helpful to see actual error that happens...


On 19.04.2017 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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 :

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 [hidden email]om.
To post to this group, send email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen


--
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 [hidden email]om.
To post to this group, send email to [hidden email].
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 [hidden email]om.
To post to this group, send email to [hidden email].
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/1ZSWqeCcOU2qCnLKSrDLkDiH9XND1svarKZef71AehQS2PjMMiImZZBHjPt6AADghhHiSI5ezGkKzMk-zf3NqObwRccrXTFd5t-L-4SyXlk%3D%40nexuspro.ca.

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...@googlegroups.com.
To post to this group, send email to [hidden email].
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/2a63b15e-3218-4bb0-91ed-624ec2a87df1%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 [hidden email].
To post to this group, send email to [hidden email].
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/1e07f162-8c8c-4133-91b2-a3f6e7e00c7c%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 [hidden email].
To post to this group, send email to [hidden email].
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/CAPCf-y5O7n4koaNwASj1bJCcbGN67QOR6m4V6MdwhoJc3KrTzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Antonis Christofides-2
In reply to this post by shahab emami

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 = '[hidden email]'
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.',
        '[hidden email]',
        ['[hidden email]'],
        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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send email with django

Christian Ledermann
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
<[hidden email]> 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 = '[hidden email]'
> 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.',
>         '[hidden email]',
>         ['[hidden email]'],
>         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 [hidden email].
> To post to this group, send email to [hidden email].
> 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 [hidden email].
> To post to this group, send email to [hidden email].
> 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 [hidden email].
To post to this group, send email to [hidden email].
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.
Loading...