Sending mail using smtp server

66 views
Skip to first unread message

Rajat Singh

unread,
Sep 28, 2015, 6:56:42 PM9/28/15
to Django users
I want to know the how to send mail using google smtp server in django

Mike Dewhirst

unread,
Sep 28, 2015, 7:27:18 PM9/28/15
to django...@googlegroups.com
Rajat

In your settings.py file you need to tell Django about your mail server
like this ...

EMAIL_HOST =
EMAIL_PORT =
EMAIL_HOST_USER =
EMAIL_HOST_PASSWORD =

https://docs.djangoproject.com/en/1.7/topics/email/



On 29/09/2015 5:07 AM, Rajat Singh wrote:
> I want to know the how to send mail using google smtp server in django
>
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@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/162cda54-fe96-4dc5-8c27-a8a17926d1aa%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/162cda54-fe96-4dc5-8c27-a8a17926d1aa%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

François Schiettecatte

unread,
Sep 28, 2015, 7:35:31 PM9/28/15
to django...@googlegroups.com
You going to need to set EMAIL_USE_TLS = True, and EMAIL_PORT = 587.

And you will need to set "Allow less secure apps: ON” on:

https://myaccount.google.com/security?hl=en

because Google uses OAUTH (I think) and it is beyond the standard SMTP client (to the best of my recollection)

François
> 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 django...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5609CC89.9000609%40dewhirst.com.au.

Robert librado

unread,
Oct 2, 2015, 3:52:20 PM10/2/15
to Django users
when ive used this method ive experience errors the port 587 seems to have issues. 
could you post some basic code. that would work 
for anybody 
please thanks 
email me back 
Reply all
Reply to author
Forward
0 new messages