Wednesday, October 22, 2008

Using Gmail with Django

(permalink)
It's easy to set up django to send emails through Gmail. Just use the following settings:


DEFAULT_FROM_EMAIL = 'user@gmail.com'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'user@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
EMAIL_PORT = 25


Gmail supports other ports, which you can use as well. This is important if you're running thee server on your local machine, and your ISP blocks port 25.

Labels: ,

blog comments powered by Disqus

Links to this post:

Create a Link

<< Home